Jump to content

crzftx

Active Members
  • Posts

    189
  • Joined

  • Last visited

About crzftx

  • Birthday 01/01/2000

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

crzftx's Achievements

Prodigy

Prodigy (4/7)

0

Reputation

  1. That code works flawlessly on my x64 Win7. Is it possibly one of the surrounding lines of code?
  2. storing the handles. For example in a file or on a listview
  3. Thanks for the response, but the example from the helpfile did not work. Notepad opened... nothing happened. Soon the AutoIt icon dissapeared Maybe because I'm on win7 x64?
  4. After a bit of searching, it looks like maybe an error in the cast from pointer to integer, since I'm on 64-bit Windows. It is more likely my error than the developers, but I cannot figure out what I did wrong. Run("notepad.exe") WinWait("[CLASS:Notepad]") ConsoleWrite(String(HWnd(WinGetHandle("[CLASS:Notepad]"))) & @CRLF) ConsoleWrite(String(HWnd(String(HWnd(WinGetHandle("[CLASS:Notepad]"))))) & @CRLF) I have an HWND stored in a Windows form, so AutoIt reads it in as a string. If I want to do anything with that string, I convert it back to a handle. It seems to convert as all zeros. Any suggestions?
  5. Here's my attempt at the same thing. Hope it helps Global $msg Global $gui, $button $gui = GUICreate("Click Bot", 400, 500) $button = GUICtrlCreateButton("Run - Simple Click Bot.au3",40,50) GUISetState() Do $msg = GUIGetMsg() If ($msg = $button) Then ;do your stuff here EndIf Until ($msg = -3) ;the exit code
  6. Deleted
  7. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("Example", 250, 250) GUICtrlCreateEdit("", 0, 0, 250, 250) GUISetState(@SW_SHOW) GUICtrlSetData(-1, "Blah" & @CRLF & "Blah" & @CRLF & "Blah" & @CRLF & "Blah" & @CRLF & "Blah") While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
  8. I don't get it, the webcam turned on, the ball started moving, but the paddle wouldnt move. I took a sharpie to a piece of white paper, so I don't know...
  9. Couldn't see how that works without accompanying pictures, but maybe missing something. #include <GuiToolbar.au3> Opt("GUIOnEventMode",1) $guiMain = GUICreate("Test GUI",300,300) GUISetFont(11,500,0,"Verdana") $toolbar = _GUICtrlToolbar_Create($guiMain) $menuStatistics = _GUICtrlToolbar_AddString($toolbar,"Statistics") ;$menuStatistics = GUICtrlCreateMenuItem("Statistics",-1) GUICtrlSetOnEvent(-1,"ShowStatistics") $menuOptions = _GUICtrlToolbar_AddString($toolbar,"Options") ;$menuOptions = GUICtrlCreateMenuItem("Options",-1) GUICtrlSetOnEvent(-1,"ShowOptions") $menuHelp = _GUICtrlToolbar_AddString($toolbar,"Help") ;$menuHelp = GUICtrlCreateMenuItem("Help",-1) GUICtrlSetOnEvent(-1,"ShowHelp") GUISetOnEvent(-3,"Quit") GUISetState() While 1 Sleep(25) WEnd Func ShowStatistics() ConsoleWrite("User pressed Statistics" & @CRLF) EndFunc Func ShowOptions() ConsoleWrite("User pressed Options" & @CRLF) EndFunc Func ShowHelp() ConsoleWrite("User pressed Help" & @CRLF) EndFunc Func Quit() Exit EndFunc
  10. There is something wrong with this forum... Everything is continually freezing. Here's my attempt, hope you learn best by example: Opt("GUIOnEventMode",1) Global $guiMain, $labelInstalled[5], $buttonInstall[5] $guiMain = GUICreate("Application GUI",345,150) GUICtrlCreateLabel("Notepad",5,5,100,20) GUICtrlCreateLabel("App 2",5,35,100,20) GUICtrlCreateLabel("App 3",5,65,100,20) GUICtrlCreateLabel("App 4",5,95,100,20) GUICtrlCreateLabel("App 5",5,125,100,20) For $z = 0 To 4 $labelInstalled[$z] = GUICtrlCreateLabel("Installed",120,5 + 30 * $z,100,20) GUICtrlSetColor(-1,0x00FF00) $buttonInstall[$z] = GUICtrlCreateButton("Remove",240,5 + 30 * $z,100,20) GUICtrlSetOnEvent(-1,"InstallApp") Next GUISetOnEvent(-3,"Quit") GUISetState() While 1 Sleep(25) WEnd Func InstallApp() Local $index = (@GUI_CtrlId - $buttonInstall[0])/2 If GUICtrlRead($labelInstalled[$index]) = "Installed" Then GUICtrlSetData($labelInstalled[$index],"Not Installed") GUICtrlSetColor($labelInstalled[$index],0xFF0000) GUICtrlSetData($buttonInstall[$index],"Install") Else GUICtrlSetData($labelInstalled[$index],"Installed") GUICtrlSetColor($labelInstalled[$index],0x00FF00) GUICtrlSetData($buttonInstall[$index],"Remove") EndIf EndFunc Func Quit() Exit EndFunc
×
×
  • Create New...