Toysan Posted July 17, 2012 Share Posted July 17, 2012 I was trying to write simple GUI program with using. But thats too harsh for me and as more I read about AutoIt as less I knew from it 0.oMy idea was to cr8t simple program which when I click START button then:1. it presses (NOT holds) num 92. wait 0.5s3. it presses (NOT holds) num 84. wait 4sand reapeats whole actions from 1 to 4 till I Click STOP button.If someone would think that, I want to use someone than belive me I am not, I am still trying to cr8t it with AutoIt tool called Koda (version 1.7.3.0) but with TOTALLY shitty progress T-T. I was simply not born for scripting.. So plz someone help. Link to comment Share on other sites More sharing options...
Toysan Posted July 17, 2012 Author Share Posted July 17, 2012 Sorry for posting it in wrong section Link to comment Share on other sites More sharing options...
Toysan Posted July 17, 2012 Author Share Posted July 17, 2012 Here is a code I Made, To show how does my window looks like...#include <ButtonConstants.au3>#include <GUIConstantsEx.au3>#include <StaticConstants.au3>#include <WindowsConstants.au3>#Region ### START Koda GUI section ### Form=Global $Form1 = GUICreate("Auto 8,9", 301, 101, 313, 303)GUISetBkColor(0xFFFF00)Global $Button1 = GUICtrlCreateButton("START", 24, 24, 113, 41)GUICtrlSetBkColor($Button1, 0x00FF00)Global $Button2 = GUICtrlCreateButton("STOP", 184, 24, 113, 41)GUICtrlSetBkColor($Button2, 0xFF0000)Global $Pic1 = GUICtrlCreatePic("C:UsersAdminDocumentsautosave_0069_640x360.bmp", 0, 0, 300, 100)GUISetState(@SW_SHOW)#EndRegion ### END Koda GUI section ###While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitchWEnd But still I do not know how to make main START and STOP part Link to comment Share on other sites More sharing options...
Digisoul Posted July 17, 2012 Share Posted July 17, 2012 Here is a code I Made, To show how does my window looks like... #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Auto 8,9", 301, 101, 313, 303) GUISetBkColor(0xFFFF00) Global $Button1 = GUICtrlCreateButton("START", 24, 24, 113, 41) GUICtrlSetBkColor($Button1, 0x00FF00) Global $Button2 = GUICtrlCreateButton("STOP", 184, 24, 113, 41) GUICtrlSetBkColor($Button2, 0xFF0000) Global $Pic1 = GUICtrlCreatePic("C:UsersAdminDocumentsautosave_0069_640x360.bmp", 0, 0, 300, 100) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd But still I do not know how to make main START and STOP part expandcollapse popup#include #include #include #include #region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Auto 8,9", 301, 101, 313, 303) GUISetBkColor(0xFFFF00) Global $Button1 = GUICtrlCreateButton("START", 24, 24, 113, 41) GUICtrlSetBkColor($Button1, 0x00FF00) Global $Button2 = GUICtrlCreateButton("STOP", 184, 24, 113, 41) GUICtrlSetBkColor($Button2, 0xFF0000) GUICtrlSetState($Button2,$GUI_DISABLE) Global $Pic1 = GUICtrlCreatePic("C:UsersAdminDocumentsautosave_0069_640x360.bmp", 0, 0, 300, 100) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### Global $workStatus = False, $Timer, $Mode = 1, $INIT = False While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ConsoleWrite("Start Button Pressed!" & @LF) $INIT = True $workStatus = True GUICtrlSetState($Button1,$GUI_DISABLE) GUICtrlSetState($Button2,$GUI_ENABLE) Case $Button2 ConsoleWrite("Stop Button Pressed!" & @LF) $workStatus = False GUICtrlSetState($Button2,$GUI_DISABLE) GUICtrlSetState($Button1,$GUI_ENABLE) EndSwitch If $workStatus = True Then Switch $Mode Case 1; Press 9 If $INIT = False Then If TimerDiff($Timer) < 500 Then ContinueLoop; 0.5 Sec ElseIf $INIT = True Then $INIT = False EndIf ;==================== Send("{9}") $Mode = 2 $Timer = TimerInit() Case 2 If TimerDiff($Timer) >= 4000 Then ; 4 Sec Send("{8}") $Mode = 1 $Timer = TimerInit() EndIf EndSwitch EndIf WEnd 73 108 111 118 101 65 117 116 111 105 116 Link to comment Share on other sites More sharing options...
Tripredacus Posted July 18, 2012 Share Posted July 18, 2012 Global $Pic1 = GUICtrlCreatePic("C:UsersAdminDocumentsautosave_0069_640x360.bmp", 0, 0, 300, 100)This wouldn't be for a game like Witcher 2, would it? Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
Valik Posted July 18, 2012 Share Posted July 18, 2012 That is a rather suspicious file name. I didn't play The Witcher 2 much after I bought it so I'm struggling to come up with why somebody would want to automate it.That said, I'm incredibly tempted to lock this thread just because the OP keeps using "cr8t" instead of "create". The post uses capitalization and punctuation but interjects that English murder into it? somdcomputerguy 1 Link to comment Share on other sites More sharing options...
Valik Posted July 19, 2012 Share Posted July 19, 2012 I was going to give the user a chance to respond but apparently they got their answer and won't be back until they have another question. Thread locked so I can close the report. Link to comment Share on other sites More sharing options...
JohnOne Posted July 19, 2012 Share Posted July 19, 2012 Posting in locked thread. AutoIt Absolute Beginners  Require a serial  Pause Script  Video Tutorials by Morthawt  ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Attckdog Posted July 20, 2012 Share Posted July 20, 2012 Posting in locked thread.I must have picked the lock ! A true renaissance man Link to comment Share on other sites More sharing options...
Valik Posted July 20, 2012 Share Posted July 20, 2012 Hmm. Not the first thread I had issues locking today. Link to comment Share on other sites More sharing options...
Valik Posted July 20, 2012 Share Posted July 20, 2012 Seems to be really locked this time... I hope. Link to comment Share on other sites More sharing options...
Recommended Posts