Floflo Posted August 2, 2006 Share Posted August 2, 2006 Hello I've got a function that call another one with HotKeySet Func Toto($titi) $HK=HotKeySet("{Esc}","Ptilou") msgbox.... msgbox... [] msgbox... [] ... EndFunc Func Ptilou($y) ... ... EndFunc My first problem is that I want that the Function Toto waits for the user to press 'Esc' between []. Then, I would like to put one parameter in the function Ptilou, but I don't know how I can put it using HotKeySet (cause I don't want to use a Global Variable). Thanks Bye Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 2, 2006 Moderators Share Posted August 2, 2006 You can't use parameters with HotKeySet() directly, make another function it calls and send the parameter that way if you must, otherwise, what's wrong with global? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Floflo Posted August 3, 2006 Author Share Posted August 3, 2006 (edited) Finally i use global. I don't like to use global cause i learnt in all other languages that it increase the memory use (I don't know how i can explain it, but something like that). My problem is to pause the first Function until the user call the second by "pressing" 'Esc'. PS: i'm not sure of "pressing", just press the HotKey 'Esc' . Thanks for the first answer, which was very quick. ++ Edited August 3, 2006 by Floflo Link to comment Share on other sites More sharing options...
Briegel Posted August 3, 2006 Share Posted August 3, 2006 (edited) Do you mean something like this? Func Toto($titi) $HK=HotKeySet("{Esc}","Ptilou") $go_on = 0 msgbox.... msgbox... [] SplashTextOn('Title','Press ESC ...',100,50) While 1 If $go_on = 1 Then ExitLoop Sleep(100) WEnd [] ... EndFunc Func Ptilou($y) SplashOff() $go_on = 1 MsgBox() EndFunc EDIT: SplashTextOn() instead of MsgBox(). Edited August 3, 2006 by Briegel Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now