cdm_Death Posted October 1, 2006 Share Posted October 1, 2006 (edited) ... Im runnin it I checked it I cant figure out why it isnt writing them to file... I plan to have a "hit 1 get pos y in first input x in second, hit 2 get y in third x in fourth" command down the road but with manual input im having issues... expandcollapse popup#include <GuiConstants.au3> If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 Opt("GUIOnEventMode", 1) ;HotKeySet("{1}", "y1x1") ;HotKeySet("{2}", "y2x2") $file = "DeathsAutoMove.txt" Func y1x1() $y1 = MouseGetPos(1) $x1 = MouseGetPos(0) EndFunc Func y2x2() $y2 = MouseGetPos(1) $x2 = MouseGetPos(0) EndFunc Func save() $Input_1 = $y1 $Input_2 = $x1 $Input_3 = $y2 $Input_4 = $x2 FileOpen ( $file, 2 ) FileWriteLine($file, $y1) FileWriteLine($file, $x1) FileWriteLine($file, $y2) FileWriteLine($file, $x2) GUIDelete () FileClose( $file ) MSgBox(1, "Death's AutoMove", "Thank You for your use and support of Death's d2 Products.") Exit EndFunc Func cancel() GUIDelete () MSgBox(1, "Death's AutoMove", "Thank You for your use and support of Death's d2 Products.") Exit EndFunc If $file = -1 Then $y1 = 0 $x1 = 0 $y2 = 0 $x2 = 0 Else $y1 = FileReadLine( $file, 1) $x1 = FileReadLine( $file, 2) $y2 = FileReadLine( $file, 3) $x2 = FileReadLine( $file, 4) EndIf GuiCreate("Death's AutoMove", 371, 194,(@DesktopWidth-371)/2, (@DesktopHeight-194)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Input_1 = GuiCtrlCreateInput($y1, 220, 40, 55, 20) $Input_2 = GuiCtrlCreateInput($x1, 150, 40, 55, 20) $Input_3 = GuiCtrlCreateInput($y2, 220, 90, 55, 20) $Input_4 = GuiCtrlCreateInput($x2, 150, 90, 55, 20) $save = GuiCtrlCreateButton("Save", 50, 150, 120, 30) GUICtrlSetOnEvent($save, "save") $cancel = GuiCtrlCreateButton("Cancel", 190, 150, 130, 30) GUICtrlSetOnEvent($cancel, "cancel") $Icon_5 = GuiCtrlCreateIcon("Icon5", 0, 10, 10, 110, 110) $Label_6 = GuiCtrlCreateLabel("Item 1:", 130, 10, 210, 20) $Label_7 = GuiCtrlCreateLabel("Item 2:", 130, 70, 210, 20) GUISetState (@SW_SHOW) While 1 Sleep(1000) WEnd My thinking is maybe i should put the save function at the end, but im really not sure at all.... also Im looking to make a function to set them automaticly... is there a gui command to like... re-do the input boxes, so as it gets the x and y it puts them in and shows them ? Edited October 1, 2006 by cdm_Death Link to comment Share on other sites More sharing options...
cdm_Death Posted October 1, 2006 Author Share Posted October 1, 2006 Thought... if I put GUICtrlSetInput ($input_1, $y1) for each input space, so that it updates whene the y1x1 y2x2 functions are called... would that work for the second half of my question? Link to comment Share on other sites More sharing options...
ChrisL Posted October 1, 2006 Share Posted October 1, 2006 y1x1() and y2x2() are never called What exactly is it supposed to do? [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...
Fossil Rock Posted October 1, 2006 Share Posted October 1, 2006 Well your HotKeySet's are commented out .. thus they'll never do anything. The first 2 functions do the exact same thing and will never be called (see above). The rest of the functions aren't called from anywhere, thus it's not going to do anything. Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
cdm_Death Posted October 1, 2006 Author Share Posted October 1, 2006 (edited) $save = GuiCtrlCreateButton("Save", 50, 150, 120, 30) GUICtrlSetOnEvent($save, "save") $cancel = GuiCtrlCreateButton("Cancel", 190, 150, 130, 30) GUICtrlSetOnEvent($cancel, "cancel") Thoes should call the functions, right now I have the hotkeys commented out so that I can test just the function "save" cancel works fine... the issue is when $Input_1 = GuiCtrlCreateInput($y1, 220, 40, 55, 20) $Input_2 = GuiCtrlCreateInput($x1, 150, 40, 55, 20) $Input_3 = GuiCtrlCreateInput($y2, 220, 90, 55, 20) $Input_4 = GuiCtrlCreateInput($x2, 150, 90, 55, 20) This should (If im not mistaken) this should make each input the variables $input_# so that whene save is called; Func save() $Input_1 = $y1 $Input_2 = $x1 $Input_3 = $y2 $Input_4 = $x2 FileOpen ( $file, 2 ) FileWriteLine($file, $y1) FileWriteLine($file, $x1) FileWriteLine($file, $y2) FileWriteLine($file, $x2) GUIDelete () FileClose( $file ) MSgBox(1, "Death's AutoMove", "Thank You for your use and support of Death's d2 Products.") Exit EndFunc It should write convert each input variable to its corresponding $y#, and then write thoes to the file $file The issue is it commes up with a blank file... my next step will be to make a hotkey get the position of the mouse and put it into thoes input spaces, but untill i get the base to work im not adding features. Please help Edited October 1, 2006 by cdm_Death Link to comment Share on other sites More sharing options...
ChrisL Posted October 1, 2006 Share Posted October 1, 2006 I don't know about anyone else but I'm still lost at what exactly your trying to do. Write it down in precise steps. ie, click "start" get mouse position Record mouse position in input box 1 etc etc [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...
cdm_Death Posted October 1, 2006 Author Share Posted October 1, 2006 I'm just lookin for help on the gui variables and writing them to a file for now Link to comment Share on other sites More sharing options...
cdm_Death Posted October 2, 2006 Author Share Posted October 2, 2006 (edited) GOT IT! nvm... knew issues now but there legistic not knoldege wow i butchered the spellin on alot of this topic =\ Edited October 2, 2006 by cdm_Death 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