Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/11/2019 in all areas

  1. @gallarh, You do realize you reported your own thread as "Reported as Inappropriate Content / Game Bots.? *click* Jos
    3 points
  2. @dchaosw360 Having a script 1000 lines long is not an excuse to not post a valid reproducer script of your question, since you are asking for help about GUISetAccelerators, and in your script there is no such function, so, for the next time, just keep in mind it. A slightly modified version of the example provided in the Help file about GUICtrlSetAccelerators(): #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() GUICreate("Custom MsgBox", 225, 80) GUICtrlCreateLabel("Please select a button.", 10, 10) Local $idInput = GUICtrlCreateInput("Exit", 80, 50, 65, 25) ; Set GUIAccelerators for the Input control Local $aAccelKeys[1][2] = [["{ENTER}", $idInput]] GUISetAccelerators($aAccelKeys) GUISetState(@SW_SHOW) ; Display the GUI. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idInput MsgBox($MB_SYSTEMMODAL, "", GUICtrlRead($idInput)) EndSwitch WEnd GUIDelete() ; Delete the GUI. EndFunc ;==>Example
    2 points
  3. According to Google CATIA supports silent installation.
    1 point
  4. The script should look similar to this: #include <OutlookEX.au3> ; ***************************************************************************** ; Example Script ; Handle Outlook NewmailEX event when one/multiple new mail(s) arrive(s). ; This script loops until Shift-Alt-E is pressed to exit. ; ***************************************************************************** HotKeySet("+!e", "_Exit") ;Shift-Alt-E to Exit the script MsgBox(64, "OutlookEX UDF Example Script", "Hotkey to exit the script: 'Shift-Alt-E'!") Global $oOApp = ObjCreate("Outlook.Application") Global $test = ObjEvent($oOApp, "oOApp_") While 1 Sleep(10) WEnd ; Outlook 2007 - NewMailEx event - http://msdn.microsoft.com/en-us/library/bb147646%28v=office.12%29.aspx Func oOApp_NewMailEx($sEntryIDs) ConsoleWrite("OutlookEX UDF Example Script - New mail has arrived!" & @CRLF & @CRLF) Local $oItem, $aEntryIDs = StringSplit($sEntryIDs, ",", $STR_NOCOUNT) For $i = 0 To UBound($aEntryIDs) - 1 $oItem = $oOApp.Session.GetItemFromID($aEntryIDs[$i], Default) ConsoleWrite("From: " & $oItem.SenderName & @CRLF & _ "Subject: " & $oItem.Subject & @CRLF) Next EndFunc ;==>oOApp_NewMailEx Func _Exit() Exit EndFunc ;==>_Exit
    1 point
  5. (@HOUR = 0 OR @HOUR = 12 ? 12 : Mod(@HOUR , 12)) can also be written as : If @HOUR = 0 OR @HOUR = 12 Then ; @HOUR=00 or @HOUR=12 ==> write 12 ConsoleWrite('> IF : 12' & @CRLF) Else ; @HOUR=01..11 or @HOUR=13..23 ==> write @HOUR modulo 12 ConsoleWrite('> ELSE : ' & Mod(@HOUR , 12) & @CRLF) EndIf Mod stands for modulo operation : https://en.wikipedia.org/wiki/Modulo_operation ConsoleWrite('< --------------------------------------------- ' & @CRLF) ConsoleWrite('> @HOUR = ' & @HOUR & @CRLF) ConsoleWrite('< --------------------------------------------- ' & @CRLF) If @HOUR = 0 OR @HOUR = 12 Then ; @HOUR=00 or @HOUR=12 ==> write 12 ConsoleWrite('> IF : 12' & @CRLF) Else ; @HOUR=01..11 or @HOUR=13..23 ==> write @HOUR modulo 12 ConsoleWrite('> ELSE : ' & Mod(@HOUR , 12) & @CRLF) EndIf ; @HOUR : Hours value of clock in 24-hour format. Range is 00 to 23 ConsoleWrite('< ----- All values ---------------------------- ' & @CRLF) ConsoleWrite('+ 00 modulo 12 = ' & Mod(0 , 12) & @CRLF) ConsoleWrite('+ 01 modulo 12 = ' & Mod(1 , 12) & @CRLF) ConsoleWrite('+ 02 modulo 12 = ' & Mod(2 , 12) & @CRLF) ConsoleWrite('+ 03 modulo 12 = ' & Mod(3 , 12) & @CRLF) ConsoleWrite('+ 04 modulo 12 = ' & Mod(4 , 12) & @CRLF) ConsoleWrite('+ 05 modulo 12 = ' & Mod(5 , 12) & @CRLF) ConsoleWrite('+ 06 modulo 12 = ' & Mod(6 , 12) & @CRLF) ConsoleWrite('+ 07 modulo 12 = ' & Mod(7 , 12) & @CRLF) ConsoleWrite('+ 08 modulo 12 = ' & Mod(8 , 12) & @CRLF) ConsoleWrite('+ 09 modulo 12 = ' & Mod(9 , 12) & @CRLF) ConsoleWrite('+ 10 modulo 12 = ' & Mod(10, 12) & @CRLF) ConsoleWrite('+ 11 modulo 12 = ' & Mod(11, 12) & @CRLF) ConsoleWrite('+ 12 modulo 12 = ' & Mod(12, 12) & @CRLF) ConsoleWrite('+ 13 modulo 12 = ' & Mod(13, 12) & @CRLF) ConsoleWrite('+ 14 modulo 12 = ' & Mod(14, 12) & @CRLF) ConsoleWrite('+ 15 modulo 12 = ' & Mod(15, 12) & @CRLF) ConsoleWrite('+ 16 modulo 12 = ' & Mod(16, 12) & @CRLF) ConsoleWrite('+ 17 modulo 12 = ' & Mod(17, 12) & @CRLF) ConsoleWrite('+ 18 modulo 12 = ' & Mod(18, 12) & @CRLF) ConsoleWrite('+ 19 modulo 12 = ' & Mod(19, 12) & @CRLF) ConsoleWrite('+ 20 modulo 12 = ' & Mod(20, 12) & @CRLF) ConsoleWrite('+ 21 modulo 12 = ' & Mod(21, 12) & @CRLF) ConsoleWrite('+ 22 modulo 12 = ' & Mod(22, 12) & @CRLF) ConsoleWrite('+ 23 modulo 12 = ' & Mod(23, 12) & @CRLF)
    1 point
  6. Many Thanks for your help, that gives me a start. I am reasonably good with Powershell. I will post my post my feedback after some days
    1 point
  7. Implementing subitem checkboxes in a listview is super simple: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 Opt( "MustDeclareVars", 1 ) #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> Global $idListView, $hListView Example() Func Example() ; Create GUI GUICreate( "Listview with subitem checkboxes", 800, 598+20 ) ; Create ListView $idListView = GUICtrlCreateListView( "", 10, 10, 800-20, 598, $GUI_SS_DEFAULT_LISTVIEW, $WS_EX_CLIENTEDGE ) _GUICtrlListView_SetExtendedListViewStyle( $idListView, $LVS_EX_DOUBLEBUFFER+$LVS_EX_SUBITEMIMAGES ) ; Subitem images $hListView = GUICtrlGetHandle( $idListView ) ; ImageList Local $idListView2 = GUICtrlCreateListView( "", 0, 0, 1, 1 ) ; 1x1 pixel listview to create state image list with checkbox icons _GUICtrlListView_SetExtendedListViewStyle( $idListView2, $LVS_EX_CHECKBOXES ) ; The $LVS_EX_CHECKBOXES style forces the state image list to be created Local $hImageList = _GUICtrlListView_GetImageList( $idListView2, 2 ) ; Get the state image list with unchecked and checked checkbox icons _GUICtrlListView_SetImageList( $idListView, $hImageList, 1 ) ; Set the state image list as a normal small icon image list in $idListView ; Now the checkboxes can be handled like normal subitem icons ; Add 10 columns For $i = 0 To 9 _GUICtrlListView_AddColumn( $idListView, "Col " & $i, 75 ) Next ; Add 100 rows For $i = 0 To 100 - 1 _GUICtrlListView_AddItem( $idListView, $i, 0 ) ; Image index 0 = unchecked checkbox For $j = 1 To 9 _GUICtrlListView_AddSubItem( $idListView, $i, $i & " / " & $j, $j, 0 ) ; Image index 0 = unchecked checkbox Next Next ; WM_NOTIFY message handler to toggle checkboxes GUIRegisterMsg( $WM_NOTIFY, "WM_NOTIFY" ) ; Show GUI GUISetState( @SW_SHOW ) ; Message loop While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd ; Cleanup GUIDelete() EndFunc ; Message handler to toggle checkboxes Func WM_NOTIFY( $hWnd, $iMsg, $wParam, $lParam ) Local $tNMHDR = DllStructCreate( $tagNMHDR, $lParam ) Switch HWnd( DllStructGetData( $tNMHDR, "hWndFrom" ) ) Case $hListView Switch DllStructGetData( $tNMHDR, "Code" ) Case $NM_CLICK Local $aHit = _GUICtrlListView_SubItemHitTest( $hListView ) If $aHit[0] >= 0 And $aHit[1] >= 0 Then ; Item and subitem Local $iIcon = _GUICtrlListView_GetItemImage( $idListView, $aHit[0], $aHit[1] ) ; Get checkbox icon _GUICtrlListView_SetItemImage( $idListView, $aHit[0], $iIcon = 0 ? 1 : 0, $aHit[1] ) ; Toggle checkbox icon _GUICtrlListView_RedrawItems( $idListView, $aHit[0], $aHit[0] ) ; Redraw listview item EndIf EndSwitch EndSwitch Return $GUI_RUNDEFMSG #forceref $hWnd, $iMsg, $wParam EndFunc The idea is addressed in this example.
    1 point
  8. Move your mouse on the heart symbol of the post you would like to thank its author for. Then click 'Like' or 'Thanks'. It's located to the right below the contribution.
    1 point
  9. the last item the OP mentioned, that can't be done with autoit, it's the packager (InstallShield/Wise/Inno, etc...)that can make a bootstrapped setup.exe all compressed into one. then if you do that, the silent install command is different. lol just use the msi and also install it's prerequisites (programs/software it depends on) first, then run the msi silent. you might be able to use Orca to make a setup.exe all in one. All of our products rely on other off the shelf software so i use a setup.exe when i do the packaging using InstallShield, so it can install all the prereqs and then the main product suite.
    1 point
  10. Basic method: #RequireAdmin RunWait('msiexe.exe /i "' & @ScriptDir & '\Filename.msi" /QB /NORESTART') ;~ Or RunAsWait("Username", "Domain", "Password", 0, 'msiexe.exe /i "' & @ScriptDir & '\Filename.msi" /QB /NORESTART')
    1 point
  11. Like this? Local $myVar = 3.1415926 Local $s = "my var name = $myvar$" Opt("ExpandVarStrings", 1) ConsoleWrite($s & @LF) ConsoleWrite("CR then LF is @CRLF@" & "CR then LF inserted!" & @LF)
    1 point
  12. Okay, this is exciting. I'm proud to introduce CompileIt - an experimental compiler, that allows to compile AutoIt to machine code. ...Kind of. CompileIt does compilation in a similar way the Glasgow Haskell compiler does: translates the code into a lower-level language (in CompileIt's case it's C), and then compiles the code in that language. Now, this project is still in its infancy, since, although it is simple to use, AutoIt is incredibly complex on the inside (automation, COM, etc.). So, CompileIt can compile only a very small subset of what we know as AutoIt. Here's a list of things CompileIt (partially) supports (or not): Numbers, booleans, strings Some built-in functions If, For and While statements Exporting DLL functions (you can now write DLL's in AutoIt, guys!) No arrays, automation, GUI or COM. A more detailed list is included with CompileIt. CompileIt is written in AutoIt (the compiler interface), JavaScript (parser, executed with ChakraCore), and of course C. GCC is required to compile scripts. After you extract the files, run CompileIt.exe and configure it to work with GCC.
    1 point
  13. Subz

    RegWrite with Windows 10

    @flaritycat - Although policies no longer work in Windows 10, just for future reference remember to use HKLM for accessing 32-bit keys and HKLM64 for 64-bit keys for example: Local $sHKLM = @OSArch = 'x64' ? 'HKLM64' : 'HKLM' RegWrite($sHKLM & "\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "NoAutoUpdate", "REG_DWORD", "0") RegWrite($sHKLM & "\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "AUOptions", "REG_DWORD", "2") RegWrite($sHKLM & "\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "ScheduledInstallDay", "REG_DWORD", "0") RegWrite($sHKLM & "\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU", "ScheduledInstallTime", "REG_DWORD", "3")
    1 point
×
×
  • Create New...