Jump to content

water

MVPs
  • Posts

    26,708
  • Joined

  • Last visited

  • Days Won

    204

water last won the day on March 1

water had the most liked content!

About water

Recent Profile Visitors

12,557 profile views

water's Achievements

  1. Now I get "Did it work: YES - Error: 0" in the SciTe console and the following task scheduler GUI. I did some research and it seems that Task Scheduler does not provide a way to automate the GUI.
  2. Your solution does not work here. Windows 11, German system language. I just get: Wouldn't it be easier and more reliable to use my Taskscheduler UDF to access the information you are looking for 🤔
  3. I do not think this is sensible as the documentation in section "function notes" clearly states:
  4. You could grab the event sent by Excel before a workbook gets closed. Something like this: #include <Excel.au3> HotKeySet("+!e", "_Exit") ;Shift-Alt-E to Exit the script MsgBox(64, "Excel UDF: Events Example", "Hotkey to exit the script: 'Shift-Alt-E'!") ; Create application object and open a workbook Global $oExcel = _Excel_Open() Global $oWorkbook = _Excel_BookNew($oExcel) ObjEvent($oWorkbook, "Workbook_") While 1 Sleep(10) WEnd Exit Func Workbook_BeforeClose() MsgBox(0, "WorkbookBeforeClose", "Name: " & $oWorkbook.Name) _Excel_Close($oExcel) _Exit() EndFunc ;==>Workbook_BeforeClose Func _Exit() Exit EndFunc ;==>_Exit This example works for the workbook opened by this script. If the user opens and closes another workbook nothing will happen.
  5. That is because your script still holds a reference to the Excel application until you call _Excel_Close.
  6. I use the following approach: use the windows calculator to translate -2147023170 (decimal) to 800706BE (hex) use Google to search for "hresult 0x800706BE Excel" Result is something like this: https://www.google.de/search?q=hresult+0x800706BE+Excel
  7. Which version of Autoit do you run? WinAPISys.au3, WinAPIProc.au3 and WinAPIHObj.au3 exist in folder C:\Program Files (x86)\AutoIt3\Include of version 3.3.16.1 I'm running
  8. Your modified version works like a champ! No re-download of the AutoItObject UDF was necessary. Thanks!
  9. I use InireadSection and IniwriteSection to handle Ini-Files. Each section holds all keys/values belonging to the same "class". It only takes a single command to read all keys/values to a 2D array. Works perfectly here
  10. I just downloaded your script and AutoItObject 1.2.8.2. I'm running Autoit 3.3.16.1 on Windows 11. When running your script I get the following error: Did I miss something?
  11. Have a look at the source of the Word UDF, function _Word_DocFindReplace to see how it works
  12. Toolstips can work this way. Hover over the header of the Tab control. #include <AutoItConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Launch Spice", 485, 220, 201, 136) $Tab1 = GUICtrlCreateTab(16, 16, 457, 140, BitOR($TCS_FOCUSONBUTTONDOWN, $TCS_TOOLTIPS)) GUICtrlCreateTabItem("Single") ; TOOLTIP for TAB 0 GUICtrlSetStyle(-1, $TCS_TOOLTIPS) GUICtrlSetTip(-1, " Tip for Tab 'Single'", "Testtitel", $TIP_INFOICON, $TIP_CENTER) $Label1 = GUICtrlCreateLabel("Single VM", 181, 40, 194, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Input1 = GUICtrlCreateInput("", 96, 95, 297, 28, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NOHIDESEL)) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateTabItem("Multi") $Label2 = GUICtrlCreateLabel("Multiple VMs", 170, 40, 194, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Input2 = GUICtrlCreateInput("", 96, 95, 297, 28, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NOHIDESEL)) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateTabItem("Lookup") $Label3 = GUICtrlCreateLabel("Lookup VM", 170, 40, 194, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Input3 = GUICtrlCreateInput("", 96, 95, 297, 28, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NOHIDESEL)) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateTabItem("") $Button1 = GUICtrlCreateButton("Deploy", 186, 165, 113, 41) ; GUICtrlSetState ( -1, $GUI_DISABLE ) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetCursor(-1, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(0, "Test", "Tab " & GUICtrlRead($Tab1) & " selected.") EndSwitch WEnd
  13. Yes there is GUICtrlRead($Tab1) returns the index of the selected tabitem (0-based). Example: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Launch Spice", 485, 220, 201, 136) $Tab1 = GUICtrlCreateTab(16, 16, 457, 140, BitOR($TCS_FOCUSONBUTTONDOWN,$TCS_TOOLTIPS)) GUICtrlCreateTabItem("Single") $Label1 = GUICtrlCreateLabel("Single VM", 181, 40, 194, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Input1 = GUICtrlCreateInput("", 96, 95, 297, 28, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NOHIDESEL)) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateTabItem("Multi") $Label2 = GUICtrlCreateLabel("Multiple VMs", 170, 40, 194, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Input2 = GUICtrlCreateInput("", 96, 95, 297, 28, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NOHIDESEL)) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateTabItem("Lookup") $Label3 = GUICtrlCreateLabel("Lookup VM", 170, 40, 194, 33) GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif") $Input3 = GUICtrlCreateInput("", 96, 95, 297, 28, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NOHIDESEL)) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateTabItem("") $Button1 = GUICtrlCreateButton("Deploy", 186, 165, 113, 41) ; GUICtrlSetState ( -1, $GUI_DISABLE ) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") GUICtrlSetCursor (-1, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(0, "Test", "Tab " & Guictrlread($Tab1) & " selected.") EndSwitch WEnd
  14. Gladyou like the UDF The thanks for this function go to the author of the original code: mLipok. I just stripped it down to it's current size
×
×
  • Create New...