Marko wrote: ↑Jun 12th, ’22, 13:24
Maybe I was not clear. In the script, you can define any number of variables and then reuse them in this or any other command.
Code: Select all
NameVar:="Albert Bensom"
AddressVar:="1, sesame streets"
;etc
Path := "C:\Users\master\Desktop\Statement.xlsx"
ahmen :=ComObjcreate("Excel.Application")
ahmen.visible := True
ahmen.Workbooks.Open(Path)
ahmen.Range("B1").Value := NameVar
ahmen.Range("B2").Value := AddressVar
Alternatively, you could define all such variables to be run when FastKeys starts - create a Start Menu item, Type: Command, select "Run on Startup" option. Type: Command:
Code: Select all
NameVar:="Albert Bensom"
AddressVar:="1, sesame streets"
;etc
Then use the variables in other scripts wherever needed.
You can also contact me directly via our support mail.
I have been trying to delcare some variables to use them in a command but Iw as having some issues. I tried the method that you mentioned start menu and add a command to run on start up, but it didnt work , instead of sending the value of the string inside the variables, the name of the variable was sent : %variable1%.
By "declaring/assigning" these variables in the tools startup script is the only way I was able to do it, but I noticed that the variables would not work unless I named them prefixfig them with "A_".
For instance is tried the examples you gave earlier:
NameVar:="Albert Bensom"
AddressVar:="1, sesame streets"
but would not work unles they were named
A_NameVar:="Albert Bensom"
A_AddressVar:="1, sesame streets".
Is there somewhere in the documantation I can read up more about this topic and understad why variables must be prefixed with A_?