Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/20/2022 in all areas

  1. AutoIt3 Interpreter might be of interest.
    1 point
  2. Try replacing the use of HWnd(...) with ControlGetHandle(...)
    1 point
  3. Nine

    NotifyBox UDF

    Since the author is not here anymore, I would suggest you make your own modification. If you prefer you could use the following streamlined version of _NotifyBox : #pragma compile(AutoItExecuteAllowed, True) #include <MsgBoxConstants.au3> HotKeySet("{ESC}", _Exit) While 1 _NotifyBox($MB_ICONERROR, ':-(', 'One.', 2) Sleep(500) _NotifyBox($MB_ICONWARNING, ':-|', 'Two.', 2) Sleep(500) _NotifyBox($MB_ICONINFORMATION, ':-)', 'Three.', 2) Sleep(3000) WEnd Func _NotifyBox($iFlag, $sTitle, $sText, $iTimeout = 0, $hWnd = 0) If $iTimeout = Default Then $iTimeout = 0 If $hWnd = Default Then $hWnd = 0 Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(' & $iFlag & ',''' & $sTitle & ''',''' & $sText & ''',' & $iTimeout & ',' & $hWnd & ')"') EndFunc ;==>_NotifyBox Func _Exit() Exit EndFunc ;==>_Exit
    1 point
  4. one more way this can spawn an external independant MsgBox detached from the main script, but from the main script you can still check what has been pressed on the external MsgBox. This mode can also be used for InputBox as well Local $pid = SpawnMsgBox(1, "Extern MsgBox", "I am detached from the main script") ; Spawn an independant msgbox Local $msg = "Hi" & @CRLF & " hit OK to check external MsgBox status" While 1 MsgBox(0, "internal MsgBox", $msg) Switch CheckExternal($pid) Case 1 ; OK Button Pressed MsgBox(0, "Result", "OK button was pressed on external MsgBox") Exit Case 2 ; Cancel Button Pressed MsgBox(0, "Result", "Cancel button was pressed on external MsgBox") Exit Case -1 ; MsgBox(0, "Result", "External MsgBox closed for timeout") Exit EndSwitch $msg = "At " & @HOUR & ":" & @MIN & ":" & @SEC & " external MsgBox was still there" WEnd ; this receives result from the external MsgBox Func CheckExternal($pid) Return StdoutRead($pid) EndFunc ;==>CheckExternal ; This spawn an MsgBox and returns the related PID Func SpawnMsgBox($iflag = 0, $sTitle = "", $sText = "", $iTimeout = 0) Return Run(@AutoItExe & ' /AutoIt3ExecuteLine "ConsoleWrite(MsgBox(' & $iflag & ', ''' & $sTitle & ''', ''' & $sText & ''', ' & $iTimeout & '))"', "", "", 0x2) ; 0x2 ($STDOUT_CHILD) EndFunc ;==>SpawnMsgBox
    1 point
  5. Mat

    AutoIt3 Interpreter.

    Current version 1.0.2.9 released 09/12/2010 [ view changelog ] [ ] Beta version 2.0.0.0 released 03/12/2010 [ No changelog ] [ ] I recently decided to try out ruby, and was very surprised when I saw how they they set out the many advantages of being an interpreted language. Along with the usual reasons, they mentioned how it was shipped with 'interactive ruby', an interpreter. When they gave all the benefits of having an interpreter like this I couldn't resist the oppertunity to make AutoIt one. The result? The AutoIt3 Interpreter, Au3Int for short. There are lots of things that were a bit of a pain to build in, and so the code is (although short) a bit more long and complex than I would've liked, but there are still a few useful tidbits in there... For example there is finally a good example of using _WinApi_OpenFile and CON, as well as setting the console window title which i've always wanted to do. The screenshot is a few versions out, I had to fix a few bugs, and build a few things in making it a nice and round 1.0.0.20 for the initial release (not least because it still takes a few tries before compiling ) Project page Changelog Downloads Bug tracker Mat
    1 point
  6. So true ... and my life stopped being just my own. That's an easy answer, marriage, but in truth technology has come on in leaps and bounds. So much more you can do with your time these days. As a child, I only had TV (latter years), Radio, Books, Vinyl Records & Cassettes, Board Games, Sport and hanging with friends. As a young man, Cars, Videos and CD's were added to the mix. Eventually, Computers, basic Computer Games were added. Then decent Console Games, DVD's and far better Computer Games. Now you have personal media devices, blu-rays and more. If one gets bored now, it's through over-stimulation or perhaps due to being a person in need (poor, etc).
    1 point
  7. Melba23

    Simple overlay

    krisddd, Welcome to the Autoit forum. From what I can see from the thread, GhostIt does not pass clicks. So drawing a GDI grid might be a better bet as this does allow clicks to pass. Perhaps something like this: #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> HotKeySet("{ESC}", "On_Exit") Global $hGUI, $aRadio[5], $hButton, $iStep $hGUI = GUICreate("Grid", 150, 190) GUICtrlCreateLabel("Choose a grid step value", 10, 10, 150, 20) GUIStartGroup() For $i = 0 To 4 $aRadio[$i] = GUICtrlCreateRadio(100 + ($i * 100), 55, 30 + ($i * 20), 100, 20) Next GUICtrlSetState($aRadio[0], $GUI_CHECKED) $hButton = GUICtrlCreateButton("Show Grid", 35, 150, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton GUISetState(@SW_HIDE, $hGUI) For $i = 0 To 4 If GUICtrlRead($aRadio[$i]) = 1 Then $iStep = GUICtrlRead($aRadio[$i], 1) ExitLoop EndIf Next Grid() EndSwitch WEnd ; ------------- Func Grid() Local $iVerticals = Floor(@DesktopWidth / $iStep) Local $iHorizontals = Floor(@DesktopHeight / $iStep) Local $hRectangle_GUI = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) GUISetBkColor(0x000000) Local $hMaster_Mask = _WinAPI_CreateRectRgn(0, 0, 0, 0) For $i = 0 To $iVerticals $hMask = _WinAPI_CreateRectRgn($i * $iStep, 0, ($i * $iStep) + 1, @DesktopHeight) _WinAPI_CombineRgn($hMaster_Mask, $hMask, $hMaster_Mask, 2) _WinAPI_DeleteObject($hMask) Next For $i = 0 To $iHorizontals $hMask = _WinAPI_CreateRectRgn(0, $i * $iStep, @DesktopWidth, ($i * $iStep) + 1) _WinAPI_CombineRgn($hMaster_Mask, $hMask, $hMaster_Mask, 2) _WinAPI_DeleteObject($hMask) Next ; Set overall region _WinAPI_SetWindowRgn($hRectangle_GUI, $hMaster_Mask) GUISetState() While 1 Sleep(10) WEnd EndFunc ;==>Grid Func On_Exit() Exit EndFunc I hope that helps. M23
    1 point
×
×
  • Create New...