Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
idiot
- Macro Veteran
- Posts: 152
- Joined: Thu Mar 01, 2007 9:21 am
Post
by idiot » Sun Dec 23, 2007 12:11 am
ok say i have a bunch of code sections like this in a script how can i get it to prompt user for text and then when something happens it uses the inputted text to type so the it will continue using the text each time to goto
sub sections like this for each letter inputted say like i have a sub for each possible letter this is something i havent done at all im lost
i know how to prompt user for input but how would i use the input like this???say like user enter "mon" as the input how could i get script to goto m then o then n subs?
Code: Select all
label>a
Let>VK_a=65
Let>ExtendedKey=1
Let>KeyUp=2
LibFunc>user32.dll,keybd_event,r,VK_a,0,ExtendedKey,0
wait>.1
Let>FLAGS={%ExtendedKey% OR %KeyUp%}
LibFunc>user32.dll,keybd_event,r,VK_a,0,FLAGS,0
goto>something
if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Wed Dec 26, 2007 8:41 am
Use the Input command, or a custom dialog.
-
idiot
- Macro Veteran
- Posts: 152
- Joined: Thu Mar 01, 2007 9:21 am
Post
by idiot » Wed Jan 02, 2008 3:46 am
really dont see how input or custom dilaog can do what im asking
i either need a really good explanation or another way of doing this

if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!
-
Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
-
Contact:
Post
by Bob Hansen » Wed Jan 02, 2008 5:04 am
Code: Select all
Input>Relation,Enter Relative
If>%Relation%<>Mom,NotMom
Gosub>m
GoSub>o
GoSub>n
Label>NotMom
Do Stuff ....
.......
Srt>m
.....
End>m
Srt>n
.....
End>n
Srt>o
.....
End>o
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
-
idiot
- Macro Veteran
- Posts: 152
- Joined: Thu Mar 01, 2007 9:21 am
Post
by idiot » Tue Jan 08, 2008 1:28 am
ok bob i see how that works if you know what the input will be but
say you dont know what they will put in is there a way to detect what is typed and go to those subs in the character order they typed or would i have to have them type in each character seperatly like if m go here if o here f n go here?i was looking for something that would detect each character and go to subs in order they where detected otherwise ill have to make like a billion functions for every possible thing they type in
im pretty sure i could do it if i had them type one character at a time
like the way you suggested bob but not quite what i need it to do
if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!
-
Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
-
Contact:
Post
by Bob Hansen » Tue Jan 08, 2008 4:29 am
You could have them type in a whole string, then use use a loop with MidStr to parse out each letter and GoSub with each pass.
The following UNTESTED example should process sub routines a,b,n,m,c,d in that order, then finish.
Code: Select all
Input>DoThese,Enter sub routines in processing order, example: abnmcd
Length>%DoThese%,MaxCount
Counter=0
Label>Loop1
Counter=%Counter%+1
MidStr>%DoThese%,%Counter%,1,ThisOne
GoSub>%ThisOne%
IF>%Counter%<%MaxCount%,Loop1,Done
SRT>a
.....
End>a
SRT>b
.....
End>b
.....
.....
SRT>z
.....
End>z
Label>Done
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!