Another Problem, Can someone Help me fix it ?

07/24/2017 15:05 owadziak#1
I made Function Called _Pause

Also added Hotkey to Toogle it on/off

HotkeySet("{F4}",_Pause()
Global $Pauza = False;

And i have problem

"
Func _Pause()
if $Pauza == True Then
$Pauza = False;
Else
$Pauza = True;
EndIf
EndFunc
"

And im trying to do in my script something like that

While(1)

If($Pauza) Then
WinActivate("Window Tittle")
Else
EndIf
; rest script here

Wend

but when i try To use this script ;) I got error and my script Crash

How to make this work like

If Function Pause = True Then
i get WinActive("Window Tittle")
Else window is not activated untill i hit F4 ?


Figured it out

#Delete Request
07/24/2017 16:45 FacePalmMan#2
Quote:
1. Choose meaningful thread titles

Please use meaningful thread titles to not confuse other members.
You may use language tags (i.e. "[Java] Problem with XYZ") when creating a thread in a section that is not related to a specific language.
Please avoid thread titles like "HELP!!!" since they don't give any information about your problem and may confuse or even annoy some members. These threads will be closed without any comment.
(quote from the coders den's rules: [Only registered and activated users can see links. Click Here To Register...])

So please choose a more meaningful title next time.
And to your code: You can write "=" instead of "==" in an If clause. (for example: If $Pauza = True) It will work fine too. Using "==" is only useful when you want to compare strings in a case-sensitive way. (e.g.: "hello" = "hELLo" --> True ; "hello" = "hello" --> True ; "hello" == "hELLo" --> False ; "hello" == "hello" --> True)
If you got any questions you can ask me. You can contact me on Skype or send me a private message.