svallie
-
Posts
5 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by svallie
-
-
I was wondering if anyone could give me any insight on how to return a specific date (MM/DD/YYYY) in time from a time caculation of say 100 days forward or backward from a chosen date (MM/DD/YYYY)
For Example:
User Selects Date from prompt = 1/25/2007
Count how many days back prompt = 100
User chooses "Calendar Days" or "Weekdays" = Weekdays
Macro returns the answer of a date that is 100 Weekdays back from 1/25/2007 which would be 9/7/2006
The code below was posted (and pretty helpful) by someone that is doing something similar, but only based on the current date in time. I would like more flexibility in choosing any date from any date:
<VARIABLE SET DECIMAL Option="\x01" Destination="%D[1]%" Mask="FALSE" OnTop="FALSE" Left="Center" Top="Center" Monitor="0"/>
<VARIABLE MODIFY DECIMAL Option="\x03" Destination="%D[2]%" Value1="%D[1]%" Value2="5"/>
<VARIABLE MODIFY DECIMAL Option="\x02" Destination="%D[3]%" Value1="%D[2]%" Value2="2"/>
<VARIABLE MODIFY DECIMAL Option="\x00" Destination="%D[4]%" Value1="%D[3]%" Value2="%D[1]%"/>
<VARIABLE MODIFY DECIMAL Option="\x05" Destination="%D[4]%" Text_Variable="%T[3]%" Places="10"/>
<VARIABLE MODIFY STRING Option="\x04" Destination="%T[3]%" Variable="%N[1]%"/>
<DATE/TIME Format="ddd" Flags="\x82" Date="12/30/1899" Day_Offset="%N[1]%" Month_Offset="-0" Year_Offset="0" Hour_Offset="-0" Minute_Offset="-0" Second_Offset="0" Left="Center" Top="Center" Monitor="0" Variable="%T[2]%" IsDateVar="FALSE" _IGNORE="0x0002"/>
<TEXT BOX DISPLAY Title="T2" Content="%T[2]%" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>
-
Very clever guys. That works well for me. You saved me hundreds of lines of code, literally. Thank you very much.
-
I have a tab delimited text file something like this:
============
John 5
Tim 6
Sally 3
Fred 9
Bill 2
Bob 11
Robert 10
Tom 7
Elliott 1
============
I have a macro that grabs a string variable (%T1%) from another file. For example [Variable set String %T1% = "Sally"]. I am trying to find a way to have the macro look in this .txt file and find %T1% (Sally) and use the reference number for the "Sally" (3) and set 3 to integer %N1%. Basically I am trying to find an easier way to loop through a text file and find the assigned integer that corresponds with the string instead of my current macro that looks like:
If %T1% = "John" Then %N1% = 5
Else
If %T1% = "Tim" Then %N1% = 6
Else
If %T1% = "Sally" Then %N1% = 3
Else
If %T1% = "Fred" Then %N1% = 9
Else
If %T1% = "Bill" Then %N1% = 2
Else
If %T1% = "Bob" Then %N1% = 11
Else
If %T1% = "Robert" Then %N1% = 10
Else
If %T1% = "Tom" Then %N1% = 7
Else
If %T1% = "Elliott" Then %N1% = 1
Else
End If
Mind you, the text file is actually much longer.
Bottom line, the reference number is the number of times I need to tab.
GOAL:
If %T1% = "Sally" Text Type: <TAB> 3 Times
Your cooperation to assist me in this matter is very much appreciated
-
Some of the applications/programs I use play a sound "beep" when a certain part of the process is finished. I can't find a command for Macro Express to "Wait for Sound" before continuing with macro. I have tried long time delays, wait for window to gain focus, etc., but that doesn't work very well. The only thing consistant about my process is when it plays a sound, it is finished. If anyone has any suggestions, it would be greatly appreciated.
Work Day/School Day Calculation
in Macro Express and Macro Express Pro
Posted
Thank you for the assistance. This helps tremendously. I can calculate this function very easily in like 3 lines of Excel VB Code, but I am not sure how the new Pro External Script feature works. If anyone would like to contribute, let me know. In the meantime, I will incorporate this in my Macro Express code. Thanks for your time.