So basically I have 2 files, one has a menu with different string to paste depending on the users choice. The second file is referenced, so when lets say the user sets the value from "example1" to "example2", I am looking that it pastes a different text when they choose the menu item.
The code below is how far I got, I have been looking in the forum and the help pages but haven't found what I am looking for.
menuitem = Is what the user chooses in the menu
Sleep 500 = I added it because the system I am using is too slow to cope with the fast pasting (don't ask me why, but I went mad until I figured it out)
Code: Select all
menuitem:
Sleep 500
Click
text =
(
some text1
)
text2=
(
some text2
)
Sleep 500
if (%value% := "example") {
wc.Paste(text2)
} else {
wc.Paste(text)
}
return
I was able to retrieve the value from the second file when using a shortcut:
Code: Select all
::_shortcut::
sendinput,
(
some text %value% some text
)
return
some text1
Desired result, if value is x in second file then paste text2.
Hope it makes sense, let me know if you have any questions I would appreciate your help, its the first time I am posting in the community^^