so i understand in V2, that all blocks of code need the curly brackets. I'm using VScode so it's clear to see what brackets are associated w/ it's counter part but it keeps telling me i have to many. (unexpected })
I am def struggling w/ the change over to V2. it would be nice if there was a collective whole, a sorta portal to search the internet thru were users could flag scripts on the open internet.
all i'm trying to do is. if you hold the right mouse button while firefox is active it minimizes notepad it maximized and visa/versa, and also open it if it not. i tried putting a # in front of hotifwinactive. that didn't work.
Code: Select all
~RButton::{
Duration := 0
Loop while GetKeyState("Rbutton","P"){
Duration++
If Duration > 5 {
If WinExist(wTitle := "Notepad") {
If WinActive(wTitle){
WinMinimize
break
}
Else {
WinActivate
break
}
Else {
Run ("Notepad.exe")
break
}
}
}
else{
Sleep(100)
}
}
}
side question: does "WTitle := "Notepad" carry over to WinMinimize or does that need to be declared everytime? (does it set that dedicated variable)
any help is appreciated. thank you.