Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/14/2017 in all areas

  1. You can try _ArrayToDeclarationString to backup your array as string, and _ArrayDeclareFromString to load the array from the string.
    2 points
  2. R0G

    Digital Sign Tool

    Digital Sign Tool V1.6 Features: Digitally sign: (.exe) (.cab) (.cat) (.ocx) (.dll) (.stl) Metro style GUI thanks @BBs19 Error logging Multi file support Instructions: You must have your (.pfx) certificate imported to the "Current User\Personal\Certificates" store Your certificate must be exportable Select your digital certificate from the drop down menu Click browse to add your files to sign Click sign For more information please visit: https://www.autoitscript.com/forum/topic/149137-sign-your-exe-with-a-digital-signature-signtoolexe/#comment-1061738 https://msdn.microsoft.com/en-us/library/bfsktky3(vs.100).aspx?f=255&MSPPError=-2147217396 Changelog: V1.6 1/8/2021 - Updated broken Signing URL - Added option to change signing URL in settings - Other Bug Fixes Download: Digital Sign Tool V1.6.zip Digital Sign Tool V0.5.zip
    1 point
  3. trancexx

    Subrogation

    I finally have some more space in the attachments folder. In the past I've had to sacrifice, delete lots of scripts I posted to be able to post more. That was shit. So, what's the subrogation in this context? It's a technique of loading dll file embedded in your script as a string or perhaps stored on a remote server. Purpose is to be able to call functions from some dll without it needed to be written on the HD. As you will see in the script I'm attaching you choose some existing file (in my case I'm going with explorer.exe) then out of embedded dll you construct new fully functional module on the fundaments of the choosen. After that you call functions from embedded module but now (and that's the beauty) you call from subrogated. Pseudo/pseudo-expressed example from the script below would be: Subrogor = "explorer.exe" Subrogee = "kernel32.dll" Subrogate(byref Subrogor, Subrogee) DllCall(Subrogor, FunctionFromSubrogee) There are different problems with (only) some dlls to embed. It can be used both for 32 and 64 bit dlls with no difference. Script: Subrogation.au3 This technique (mild) is used in this script. edit: New script.
    1 point
  4. Or use the MsgBoxConstants file. This works for me: #include <MsgBoxConstants.au3> MsgBox($MB_OKCANCEL + $MB_TOPMOST, "Registration", "Would you like to continue?")
    1 point
  5. Maybe you wanted to add them together in stead of concatenation them by using a +?
    1 point
  6. To cancel jobs and remove the printer : #include "PrintMgr.au3" #include <Array.au3> Global $LblPrnArr[2] = ["DYMO LabelWriter 330","DYMO LabelWriter 330-USB"] For $i = 0 to UBound($LblPrnArr) -1 If _Printmgr_PrinterExists($LblPrnArr[$i]) Then ; If installed printer matches If _PrintMgr_CancelAllJobs($LblPrnArr[$i]) Then _PrintMgr_RemovePrinter($LblPrnArr[$i]) EndIf Else ; not installed MsgBox(0,"Negative", "Printer " & $LblPrnArr[$i] & " not found") EndIf Next
    1 point
  7. Should be something like this: #include "PrintMgr.au3" #include <Array.au3> Global $LblPrnArr[2] = ["DYMO LabelWriter 330","DYMO LabelWriter 330-USB"] Global For $i = 0 to UBound($LblPrnArr) -1 If _Printmgr_PrinterExists($LblPrnArr[$i]) = 1 Then ; If installed printer matches MsgBox(0,"It's here","Printer " & $LblPrnArr[$i] & " found!") Else ; not installed MsgBox(0,"Negative", "Your code didn't work") EndIf Next
    1 point
  8. Melba23

    Search In ListView

    Deye, You need to set the width of the columns so that there is room for the data to display: $iListView = GUICtrlCreateListView("|", 5, 22, 340, 500 - 55) $hListView = GUICtrlGetHandle(-1) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES)) _GUICtrlListView_SetColumnWidth($hListView, 0, 160) _GUICtrlListView_SetColumnWidth($hListView, 1, 160) M23
    1 point
  9. Thanks, I'm glad to help, I know what it was like when I first started so happy to give back to the community. Thanks again.
    1 point
  10. Local $hFilePath = @AppDataDir & '\Your Application' Local $aSavedCodes = IniReadSection($hFilePath & '\SavedCodes.ini', 'SavedCodes') _ArrayDisplay($aSavedCodes)
    1 point
  11. No it doesn't require admin rights, below is a basic example: #include <Array.au3> Global $savedcodes[1][2] ; Array for saving user entered commands initiallist() Func initiallist();Initialization of array Local $hFilePath = @AppDataDir & '\Your Application' If FileExists($hFilePath) = 0 Then DirCreate($hFilePath) $code = 0 $address = 1 ;Default codes $savedcodes[UBound($savedcodes)-1][$code] = "ggggggg";###Initialization### $savedcodes[UBound($savedcodes)-1][$address] = "G:\" IniWrite($hFilePath & '\SavedCodes.ini', 'SavedCodes', $savedcodes[UBound($savedcodes)-1][$code], $savedcodes[UBound($savedcodes)-1][$address]) _ArrayAdd($savedcodes, "") $savedcodes[UBound($savedcodes)-1][$code] = "ddddddd";###Initialization### $savedcodes[UBound($savedcodes)-1][$address] = "D:\" IniWrite($hFilePath & '\SavedCodes.ini', 'SavedCodes', $savedcodes[UBound($savedcodes)-1][$code], $savedcodes[UBound($savedcodes)-1][$address]) _ArrayAdd($savedcodes, "") $savedcodes[UBound($savedcodes)-1][$code] = "ccccccc";###Initialization### $savedcodes[UBound($savedcodes)-1][$address] = "C:\" IniWrite($hFilePath & '\SavedCodes.ini', 'SavedCodes', $savedcodes[UBound($savedcodes)-1][$code], $savedcodes[UBound($savedcodes)-1][$address]) _ArrayAdd($savedcodes, "") $savedcodes[UBound($savedcodes)-1][$code] = "hhhhhhh";###Initialization### $savedcodes[UBound($savedcodes)-1][$address] = "H:\" IniWrite($hFilePath & '\SavedCodes.ini', 'SavedCodes', $savedcodes[UBound($savedcodes)-1][$code], $savedcodes[UBound($savedcodes)-1][$address]) _ArrayDisplay($savedcodes) ShellExecute($hFilePath) ;~ Should open the ini in notepad.exe EndFunc
    1 point
  12. Jos

    Aut2Exe Problem

    Seriously ? So you simply forget to mention you are moving shit around and just post an thread telling us there is a error with compiling. Guess I am becoming to old for this. Jos
    1 point
  13. Function _Excel_RangeCopyPaste is what you are looking for. Check example 2 in the help file.
    1 point
  14. Does this work? #include <Constants.au3> #include <GUIConstants.au3> Opt('MustDeclareVars', 1) Global $MsgOfForms, $SaveKey = 'HKCU\AAA Test MultiForm', $SaveName = 'FrmMAIN Showed' ; Global $FrmGUIDE = GUICreate('Guide Form', 298, 181, -1, -1) Global $EDIT_ONE = GUICtrlCreateEdit('', 16, 8, 265, 121) GUICtrlSetData($EDIT_ONE, StringFormat('This is Guide Form. Bla Bla\r\n\r\nBla Bla\r\nBla Bla\r\nBla Bla\r\nBla Bla\r\nBla Bla\r\nBla Bla\r\nBla Bla\r\nBla Bla\r\nBla Bla\r\n\r\nThis is Guide Form. Bla Bla')) If RegRead($SaveKey, $SaveName) == 'Yes Yes' Then ;If have value 'Yes Yes' in Registry, only need create one Button. Global $BT_GOTO_FrmMAIN = GUICtrlCreateButton('OK, Close me (Guide Form)', 50, 144, 171, 25) Else Global $BT_EXIT = GUICtrlCreateButton('Exit', 16, 144, 75, 25) Global $BT_GOTO_FrmMAIN = GUICtrlCreateButton('Go to Main Form and hide me', 112, 144, 171, 25) EndIf ; Global $FrmMAIN = GUICreate('Main form', 260, 168, -1, -1) Global $BT_EXIT_ALL = GUICtrlCreateButton('Exit all', 77, 116, 105, 25) Global $BT_SHOW_FrmGUIDE = GUICtrlCreateButton('Show Guide Form and hide me', 45, 45, 177, 25) ; If RegRead($SaveKey, $SaveName) == 'Yes Yes' Then ;Only the FrmMAIN is showed (If have value 'Yes Yes' in Registry), no show FrmGUIDE. GUISetState(@SW_SHOW, $FrmMAIN) GUISetState(@SW_HIDE, $FrmGUIDE) Else GUISetState(@SW_SHOW, $FrmGUIDE) GUISetState(@SW_HIDE, $FrmMAIN) EndIf ; While 1 $MsgOfForms = GUIGetMsg(1) Switch $MsgOfForms[1] Case $FrmGUIDE Local $Only_FrmMAIN_Showed = RegRead($SaveKey, $SaveName) Switch $Only_FrmMAIN_Showed Case 'Yes Yes' If $MsgOfForms[0] = $GUI_EVENT_CLOSE Then Exit If $MsgOfForms[0] = $BT_GOTO_FrmMAIN Then RegWrite($SaveKey, $SaveName, 'REG_SZ', 'Yes Yes') GUISetState(@SW_HIDE, $FrmGUIDE) GUISetState(@SW_SHOW, $FrmMAIN) EndIf Case Else If $MsgOfForms[0] = $GUI_EVENT_CLOSE Or $MsgOfForms[0] = $BT_EXIT Then Exit ElseIf $MsgOfForms[0] = $BT_GOTO_FrmMAIN Then RegWrite($SaveKey, $SaveName, 'REG_SZ', 'Yes Yes') GUISetState(@SW_HIDE, $FrmGUIDE) GUISetState(@SW_SHOW, $FrmMAIN) EndIf EndSwitch Case $FrmMAIN If $MsgOfForms[0] = $GUI_EVENT_CLOSE Or $MsgOfForms[0] = $BT_EXIT_ALL Then Exit ElseIf $MsgOfForms[0] = $BT_SHOW_FrmGUIDE Then GUISetState(@SW_HIDE, $FrmMAIN) GUISetState(@SW_SHOW, $FrmGUIDE) EndIf EndSwitch WEnd
    1 point
  15. Subz

    Delete Rows in .xls

    Something similar to Junkew suggestion: Local $oWorkbook = _Excel_BookOpen($oExcel, $Dbname) If @error Then MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeDelete Example", "Error opening workbook '" & @ScriptDir & $Dbname & @CRLF & "@error = " & @error & ", @extended = " & @extended) _Excel_Close($oExcel) Exit EndIf ;~ 100 = Column CV ;~ =test : Filter _Excel_FilterSet($oWorkbook, Default, Default, 100, '=test') ;~ Offset the range so it doesn't include the first line and delete the filtered rows $oWorkbook.ActiveSheet.UsedRange.Offset(1,0).Resize($oWorkbook.ActiveSheet.UsedRange.Rows.Count - 1).Rows.Delete ;~ Remove the filter _Excel_FilterSet($oWorkbook, Default, Default, 0)
    1 point
×
×
  • Create New...