L3G3NdKillEr Posted September 6, 2007 Share Posted September 6, 2007 (edited) hi everone, I have problem with my progress bar i want if 3 key is pressed at-once then close progress bar and run the file. plzzzzzzzzz help. Note:(Does'nt Means 3 Button. Mean only numeric 3 in keyboard) expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=C:\Documents and Settings\saeed\My Documents\pak.ico #AutoIt3Wrapper_outfile=closer.exe #AutoIt3Wrapper_Allow_Decompile=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Misc.au3> ProgressOn("Insert Coin", "Insert coin to play", "0 percent") Sleep(200) For $i = 0 To 100 Step 10 If _IsPressed("33") Then Run("p1.exe") ;run this file EndIf Sleep(1000) SoundPlay(@WindowsDir & "\media\chord.wav") ProgressSet($i, $i & " %") Next ; if gta-vc exist If ProcessExists("Gta-vc.exe") Then ProcessClose("gta-vc.exe") EndIf If ProcessExists("therage.exe") Then ProcessClose("therage.exe") EndIf If ProcessExists("saerpc.exe") Then ProcessClose("saerpc.exe") EndIf If ProcessExists("Virtua_tennis_pc.exe") Then ProcessClose("virtua_tennis_pc.exe") EndIf If ProcessExists("1.exe") Then ProcessClose("1.exe") EndIf If ProcessExists("rr.exe") Then ProcessClose("rr.exe") EndIf ProgressOff() Run("importanta.exe") help is apreciated. Edited September 7, 2007 by L3G3NdKillEr i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================> Link to comment Share on other sites More sharing options...
Valuater Posted September 6, 2007 Share Posted September 6, 2007 See HotKeySet() in the help file there is a great demo at the bottom of the page with a three button combination to display a message ( or make it do what you want ) 8) Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 6, 2007 Share Posted September 6, 2007 You could also do something like set a loop and do If _IsPressed(*keys go here) Then w/e code. I'd prefer this because if you set a hotkey you can't pass parameters to the function, like if your function was Kill($WindowID) it would only Send Kill() and your code wouldn't know what to terminate and cause an error. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Valuater Posted September 6, 2007 Share Posted September 6, 2007 You could also do something like set a loop and do If _IsPressed(*keys go here) Then w/e code. I'd prefer this because if you set a hotkey you can't pass parameters to the function, like if your function was Kill($WindowID) it would only Send Kill() and your code wouldn't know what to terminate and cause an error.Many times i would agree with you, however the original poster stated I want if 3 key is pressed at-once then close progress bar and run the fileThus no parameters need passing and it is difficult to code 3 key presses at the same time8) Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 6, 2007 Share Posted September 6, 2007 I see your point but if they use a function to do this they may need the params and it's always a good idea to get in the habit of using more flexible coding, at least I think so. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
martin Posted September 6, 2007 Share Posted September 6, 2007 (edited) dbzfanaticYou could also do something like set a loop and do If _IsPressed(*keys go here) Then w/e code. I'd prefer this because if you set a hotkey you can't pass parameters to the function, like if your function was Kill($WindowID) it would only Send Kill() and your code wouldn't know what to terminate and cause an error.When I need to pass a parameter with Hotkeyset I do thisHotketset("w","func1")Func func1() Func2($params)endfunchi everone,I have problem with my progress bar i want if 3 key is pressed at-once then close progress bar and run the file.plzzzzzzzzz help.Do you still need help with this?Do you mean that you want the progress to close when 3 different keys are pressed, or do you mean you want the progress bar to close, and the file to be run straight away when the '3' key is pressed? Edited September 6, 2007 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
L3G3NdKillEr Posted September 7, 2007 Author Share Posted September 7, 2007 (edited) thanks for your reply's. ok leave this that i want to terminate the script. i olny want if _ispressed("3") then only run a file. And problem is that progressbar does'nt run at one time pressed. we have to press numeric 3 for several time then it run a file. sure u will help Edited September 7, 2007 by L3G3NdKillEr i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================> Link to comment Share on other sites More sharing options...
martin Posted September 7, 2007 Share Posted September 7, 2007 thanks for your reply's. ok leave this that i want to terminate the script. i olny want if _ispressed("3") then only run a file. And problem is that progressbar does'nt run at one time pressed. we have to press numeric 3 for several time then it run a file. sure u will help I think this does it expandcollapse popup#Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=C:\Documents and Settings\saeed\My Documents\pak.ico #AutoIt3Wrapper_outfile=closer.exe #AutoIt3Wrapper_Allow_Decompile=n #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** #include <Misc.au3> ProgressOn("Insert Coin", "Insert coin to play", "0 percent") Sleep(200) $tt = TimerInit() $i = 130 While $i < 110 If _IsPressed("33") Then ProgressOff() Run("p1.exe");run this file Exit EndIf If TimerDiff($tt) >= 1000 Then SoundPlay(@WindowsDir & "\media\chord.wav") ProgressSet($i, $i & " %") $tt = TimerInit() $i += 10 EndIf WEnd ; if gta-vc exist If ProcessExists("Gta-vc.exe") Then ProcessClose("gta-vc.exe") EndIf If ProcessExists("therage.exe") Then ProcessClose("therage.exe") EndIf If ProcessExists("saerpc.exe") Then ProcessClose("saerpc.exe") EndIf If ProcessExists("Virtua_tennis_pc.exe") Then ProcessClose("virtua_tennis_pc.exe") EndIf If ProcessExists("1.exe") Then ProcessClose("1.exe") EndIf If ProcessExists("rr.exe") Then ProcessClose("rr.exe") EndIf ProgressOff() Run("importanta.exe") Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
L3G3NdKillEr Posted September 8, 2007 Author Share Posted September 8, 2007 hey martin, there is some another problem when i run it close it self after 1 or <1 second and i have no chance to press i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================> Link to comment Share on other sites More sharing options...
martin Posted September 15, 2007 Share Posted September 15, 2007 hey martin,there is some another problem when i run it close it self after 1 or <1 second and i have no chance to press Sorry, I only just noticed this.Have you still got a problem? (I'll track this thread now for a week.) Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
L3G3NdKillEr Posted September 16, 2007 Author Share Posted September 16, 2007 Sorry, I only just noticed this.Have you still got a problem? (I'll track this thread now for a week.)Thanks for notice. Problem was solved i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================> 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