This works fine for me.
F4::
Computer = 1
Return
F5::
Computer = 2
Return
F6::
NumPad = 1
Return
F7::
NumPad = 2
Return
#If (NumPad = 1) & (Computer = 1)
=::
Soundbeep
Soundbeep
Return
#If
#If (NumPad = 2) & (Computer = 1)
=::
Soundbeep
Return
#If
To make the script easier to understand I tried this and it does not work.
F4::
Computer := Laptop
Return
F5::
Computer := Desktop
Return
F6::
NumPad := F6
Return
F7::
NumPad := F7
Return
#If (Computer = Laptop) & (NumPad = F6)
=::
Soundbeep
Soundbeep
Return
#If
#If (Computer = Laptop) & (NumPad = F7)
=::
Soundbeep
Return
#If
It does work if I only convert "computer" to a expression but when I also convert "NumPad" it stops working. Thanks
Help using variables and expressions
Re: Help using variables and expressions
Code: Select all
F4::
Computer := "Laptop"
Return
F5::
Computer := "Desktop"
Return
F6::
NumPad := "F6"
Return
F7::
NumPad := "F7"
Return
#If (Computer = "Laptop") & (NumPad = "F6")
=::
Soundbeep
Soundbeep
Return
#If
#If (Computer = "Laptop") & (NumPad = "F7")
=::
Soundbeep
Return
#If
Re: Help using variables and expressions
Thank-You! That did it.