Jump to content

l3ill

Active Members
  • Posts

    1,063
  • Joined

  • Last visited

  • Days Won

    3

Community Answers

  1. l3ill's post in Is it possible to change the text of a GUI button after it is already declared? was marked as the answer   
    You can change the Button text by using
    GUICtrlSetData( $buttonID, "Something") As mentioned above^^^
    Just place it somewhere in the function that should update it.
    Replace "Something" with your Percentage variable.
  2. l3ill's post in _ScreenCapture_SaveImage help saving image was marked as the answer   
    Turns out you have to use DirCreate to add a new folder, this should work
    #include <ScreenCapture.au3> DirCreate(@MyDocumentsDir & "\newfolder\") ss() Func ss() Local $dTimeStamp = @HOUR & @MIN & @SEC Local $hBmp ; Capture full screen $hBmp = _ScreenCapture_Capture("") ; Save bitmap to file _ScreenCapture_SaveImage(@MyDocumentsDir & "\newfolder\" & $dTimeStamp & "Image.jpg", $hBmp) ShellExecute(@MyDocumentsDir & "\newfolder\" & $dTimeStamp & "Image.jpg") EndFunc ;==>ss
  3. l3ill's post in Help StringInStr ! was marked as the answer   
    Unless you are trying to "cut" this part of the string (regardless of what random number it is)  out for further use then use:
    StringMid
  4. l3ill's post in If Statement was marked as the answer   
    Tested on Win 7 32 Bit (Working)
    >Running AU3Check (3.3.12.0)
    HotKeySet("{`}", "TogglePause")   = Pauses script ( NO additional msgbox popup )
    Yes - opens Paint
    No - opens Calc.exe
    If I may make a suggestion: Instead of using MsgBox for this, build a little GUI and use Switch case...
    Edit: - you could also do something like this if you want to stick to MsgBox
    Using Select Case instead of If statement:
    #include <Inet.au3> Local $PublicIP = _GetIP() $iMsgBoxAnswer = MsgBox(1, "IP Address", "Your IP Address is: " & $PublicIP & @CRLF & "Copy to Clipboard?") Select Case $iMsgBoxAnswer = 1 ;OK ClipPut($PublicIP) Case $iMsgBoxAnswer = 2 ;Cancel EndSelect
  5. l3ill's post in Unable to process successive ControlClicks was marked as the answer   
    Your English is fine... Welcome to the Forum !
    an alternative would be to send TAB to move down and then Spacebar  to fill in the checks.
    Bill
  6. l3ill's post in Script Help was marked as the answer   
    Or this will work for sure...
    #RequireAdmin HotKeySet("{F2}", "_func") ; HotKeySet uses F2 to start script change to whatever you want... While 1 Sleep(10) WEnd Func _func() Sleep(10) MouseClick("left") Sleep(1000) Send("{CTRLDOWN}") MouseClick("left") Send("{CTRLUP}") EndFunc ;==>_func
  7. l3ill's post in GUI create button, edit functions was marked as the answer   
    Have a look at:
    GuiCtrlSetData(editboxvar, numbervar)
  8. l3ill's post in how to close a window was marked as the answer   
    Here ya go,
    Taken from the help file example for:
    GUISetOnEvent 
    #include <Buttonconstants.au3> #include <Editconstants.au3> #include <Guiconstantsex.au3> #include <staticConstants.au3> #include <windowsConstants.au3> #include <IE.au3> #include <String.au3> #include <MsgBoxConstants.au3> #Region ### START Koda GUI section ### Form= $GUIT1 = GUICreate ("hoihallo", 286, 223, 338, 185) $labelHallo = GUICtrlCreateLabel ("hallo,,,,", 32, 24, 217, 28) GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif") $Input = GUICtrlCreateInput("", 48,80,185,21) $Button = GUICtrlCreateButton("zoek volgers", 64,120,145,49,$WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Opt("guioneventmode",1) While 1 GUICtrlSetOnEvent($Button, "Test") GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents") WEnd Func SpecialEvents() Select Case @GUI_CtrlId = $GUI_EVENT_CLOSE MsgBox($MB_SYSTEMMODAL, "Close Pressed", "ID=" & @GUI_CtrlId & " WinHandle=" & @GUI_WinHandle) Exit Case @GUI_CtrlId = $GUI_EVENT_MINIMIZE MsgBox($MB_SYSTEMMODAL, "Window Minimized", "ID=" & @GUI_CtrlId & " WinHandle=" & @GUI_WinHandle) Case @GUI_CtrlId = $GUI_EVENT_RESTORE MsgBox($MB_SYSTEMMODAL, "Window Restored", "ID=" & @GUI_CtrlId & " WinHandle=" & @GUI_WinHandle) EndSelect EndFunc ;==>SpecialEvents func Test() $name = GUIctrlread($Input) $Button = _IECreate("http://tweepi.com/auth/login") MsgBox(0,"","hoi" & $name) GUICtrlSetData($labelHallo, "number",$name) EndFunc
  9. l3ill's post in Show color with guy was marked as the answer   
    Okay Now I have:
     
    I found this very cool Mouse Finder Tool I while back (wish I knew who it came from)
    And added the above mentioned functionality:  (uses GUICtrlCreateGraphic and PixelGetColor)
    To update the GUI with the actual color while writing the Hex to the console.
    #include <Misc.au3> #include <GuiConstants.au3> Global $iColor $GUICoord = GUICreate('Mouse Finder Tool', '150', '40', '-1', '-1', '-1', '128') Global $CoordInput = GUICtrlCreateInput('', '0', '0', '150', '20', '1') GUICtrlSetFont($CoordInput, '9', '600', '', 'Arial') $rectColor = GUICtrlCreateGraphic(-1, 20, 150, 20) GUISetState(@SW_SHOW, $GUICoord) WinSetOnTop($GUICoord, '', '1') AdlibRegister("RefreshCoord", 50) Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("01", $hDLL) Then $Pos = MouseGetPos() ConsoleWrite("Mouse Coords are : X: " & $Pos['0'] & " Y: " & $Pos['1'] & @CRLF) GUICtrlSetBkColor($rectColor, $iColor) ConsoleWrite("Picked Color is : " & Hex ($iColor) & @CRLF) While _IsPressed("01") Sleep(1) WEnd EndIf If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop WEnd DllClose($hDLL) AdlibUnRegister("RefreshCoord") GUIDelete($GUICoord) Func RefreshCoord() $Pos = MouseGetPos() GUICtrlSetData($CoordInput, "X: " & $Pos['0'] & " Y: " & $Pos['1']) $iColor = PixelGetColor($Pos['0'],$Pos['1']) EndFunc
  10. l3ill's post in Finding value in registry was marked as the answer   
    Hi obfuscatedv
      Welcome to unstuck:
    $searchSite = "http://www.autoitscript.com/site/" $startPage = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page") ConsoleWrite("$startPage = " & $startPage & @CRLF) If $searchSite = $startPage Then MsgBox(0, "Success", "Yay it worked") Else MsgBox(0, "Fail", "Different Page") Endif Have fun!
    Bill
  11. l3ill's post in FTP not disconnecting was marked as the answer   
    Nope, that didn't work Thanks anyway.
    I did find a workaround by letting it load the default empty values at the end of the _clearAll() function.
    I guess you have to overwrite them because as mentioned above $HostName = "" didnt work...
    Still would like to know what the deal was though...
    Here is the fix for future searchers:
    Func _clearAll() GUICtrlSetData($HostNameB, "") GUICtrlSetData($UserNameB, "") GUICtrlSetData($PassWordB, "") $iniFile = @ScriptDir & "\login.ini" If FileExists($iniFile) Then FileDelete($iniFile) MsgBox(4096, $iniFile, $iniFile & ": Was Deleted", 2) Else MsgBox(4096, $iniFile, $iniFile & ": Does not Exist", 2) EndIf _iniLoad() EndFunc ;==>_clearAll
  12. l3ill's post in How can i assign the copied text to variable? was marked as the answer   
    $var = _ClipBoard_GetData
     
  13. l3ill's post in create menu item based on search results was marked as the answer   
    Hi dickjones007,
      you can use ubound to get the number of file returned by the array.
    Bill
    example:
    $iJ = UBound($aArray, 1) For $i = 1 To $iJ ;Loop "Bulid menu 1 item at a time" Next
  14. l3ill's post in Smth like HotKeySet but on event was marked as the answer   
    Hi mjolnirmarkiv,
      I personally have never used it but AdlibRegister might be what you are looking for...
    Bill
    >Example
  15. l3ill's post in Auto Clicker Issues was marked as the answer   
    Hi Brian,
     and welcome to the forum! It looks like you've been pretty busy there.
    I would suggest that get a simple hotkey set working and then get each individual funtion working on its own and then put them together.
    BTW there are more mistakes in your scrpt than just those 2 ;-)
    Here is something to get you started:
    HotKeySet("{F5}", "_f5") ;Scenario 1 HotKeySet("{F6}", "_f6") ;Scenario 2 Run("notepad.exe") ; to test WinSetState("[CLASS:Notepad]", "", @SW_HIDE) While 1 Sleep(28800) WEnd ;F5 Scenario 1 Func _f5() WinSetState("[CLASS:Notepad]", "", @SW_MAXIMIZE) EndFunc ;F6 Scenario 2 Func _f6() WinSetState("[CLASS:Notepad]", "", @SW_MINIMIZE) EndFunc Good luck!
×
×
  • Create New...