dudenyc Posted December 8, 2006 Posted December 8, 2006 Hello all, here is an example of my problem: HotKeySet ("{F3}", "Send_2") HotKeySet ("{F4}", "Click") HotkeySet ("{END}", "Stop") ;********** Send_1 ********** Func Send_2 () While (1) Send ("2") WEnd EndFunc ;********** Click ********** Func Click () While (1) MouseClick ("Right") WEnd EndFunc ;********** Stop ********** Func Stop () While (1) Sleep (1000) Wend EndFunc ;********** Repeater ********** ; Continuous Loop Of Program. While (1) Sleep (1) WEnd oÝ÷ ØÚ0#§¶Ú+º{a{gîËb¢{nÞ¥ªÚW¥É»!©pk+!j÷µ~éܶ*'®éçxµ«báhìZ^¦·¬²)à|"[ØÛø¿n·©y«^v§£ kzË"xÂ)e²Ú)¶ºw-í¢Ç§v&öþ/Ûjwh¢¸ ×%É" Þ¥æyÙrwH¶.Znrx§Øh±íºw-춶«~ÞÅ©©éb殶s`£²¢¢¢¢¢¢¢¢¢¢6öÖ&ò¢¢¢¢¢¢¢¢¢ ¤gVæ26öÖ&ò vÆR Ö÷W6T6Æ6²gV÷Cµ&vBgV÷C² 6VæBgV÷C²"gV÷C² tVæ@¤VæDgVæ0 But it's very inconvenient since I have more complicated functions to run "parallely" later on. Any input on how to run multiple functions paralelly in one scripting program will be greatly appreciated. Thanks a bunch in advance guys .
xcal Posted December 8, 2006 Posted December 8, 2006 Take this and run with it. HotKeySet('{F2}', 'togone') HotKeySet('{F3}', 'togtwo') HotKeySet('{escape}', 'quit') $runone = False $runtwo = False While 1 If $runone = True Then Send('a') ;stick func 1 here If $runtwo = True Then Send('b') ;stick func 2 here Sleep(100) WEnd Func togone() $runone = NOT $runone EndFunc Func togtwo() $runtwo = NOT $runtwo EndFunc Func quit() Exit EndFunc How To Ask Questions The Smart Way
herewasplato Posted December 8, 2006 Posted December 8, 2006 Take this and run with it. Okay, I tried to make something funny out of running with your sharp code - but it was just too much of a stretch - the running part, not your sharp code :-)See what that chat forum will do to ya... [size="1"][font="Arial"].[u].[/u][/font][/size]
xcal Posted December 8, 2006 Posted December 8, 2006 Haha never run with sharp code in case you trip and fall on it. How To Ask Questions The Smart Way
Paulie Posted December 8, 2006 Posted December 8, 2006 Haha never run with sharp code in case you trip and fall on it. *Ba-Dum--Chink* ...Puns
herewasplato Posted December 8, 2006 Posted December 8, 2006 ...in case you trip..you could put your $i out [size="1"][font="Arial"].[u].[/u][/font][/size]
Markus Posted December 8, 2006 Posted December 8, 2006 Hm if you really want your functions to run parallely (both work at the same time), one possibility would be to split the functions into two programs. Otherwise you could use multithreading i think (i'm not that familiar with it, but there are some threads, that deal with it). "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output
Bert Posted December 8, 2006 Posted December 8, 2006 you could try using AdlibEnable, but be careful, as it may cause CPU load The Vollatran project My blog: http://www.vollysinterestingshit.com/
dudenyc Posted December 9, 2006 Author Posted December 9, 2006 Ah, I've tested your little proggie xcal and it worked beautifully. Thanks for your quick reply Kudos to other guys also, for your opinions ^^
xcal Posted December 9, 2006 Posted December 9, 2006 But did you run with it? How To Ask Questions The Smart Way
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