Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/08/2018 in all areas

  1. water

    Advanced Math UDF

    When do you start
    2 points
  2. I think we are confusing ourselves if OP wants to check if a checkbox is ticked in the GUI created by his script or if he is trying to automate another application. It looks like the latter but to just make sure: @CaptainBeardsEyesBeard Are you trying to automate a program or are you working with your own GUI?
    2 points
  3. Jefrey

    multi threading

    Hi all! I've made this small UDF to emulate multithreading for AutoIt3. As we know, AU3 is singlethread and multithreading is only possible through direct ASM. This UDF provides a multithreading emulation through running multiple instances of your script. It also provides an easy way for sending and receiving messages between threads (temporary files are used). Example: Example 2: Docs: Download: Github ZIP Fork me on Github
    1 point
  4. careca

    Beats Player

    Version 4.66

    2,111 downloads

    Music player, supports most known filetypes and flac, with a low memory and processor usage, designed to be used in the traybar, drag-drop files/folders to listview, save and load playlists, 5 recent folders (stores last imported folders), playback available with media keys, 1 click in tray icon to hide/show, double click title bar to hide to tray, and much more. It was made for me, and my needs, but im open to sugestions. Modifier key: +Arrows Up/Down Change volume, +P Pause/Resume, Play from start if stopped, +S Stops playback, +Arrows Left/Right Jump to previous/next track, +numbers 1,2,3.. being 1=10%, 2=20% etc and 0 being 100% volume of the player, (not numpad) (modifier key can be changed in the menu.) None of this would be possible without the help of the community! Coment or send PM for suggestions of improvement or issues you have. Thank ya'll.
    1 point
  5. Duh!!!! They obviously compile/build to exe's. Thank you so much for all of your help, this absolutely fixes my problem, and I'll probably end up taking out the checkbox function because I don't ever want them to have to option, I want it to run automatically at startup every time, for every program, but I will definitely use your functions! Thank you so much again!
    1 point
  6. Okay so here's what you need to do... 1. Create three scripts. - Master - Admin - LowLevel NB: Naming is up to you. 2. Code for Master: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 210, 220, 192, 124) $Checkbox1 = GUICtrlCreateCheckbox("Run Admin Programs", 40, 112, 97, 17) $Checkbox2 = GUICtrlCreateCheckbox("Run LowLevel Programs", 40, 142, 97, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Checkbox1 $Read = GUICtrlRead($Checkbox1) Marker() Case $Checkbox2 $Read = GUICtrlRead($Checkbox2) Marker2() EndSwitch WEnd Func Marker() If $Read = $GUI_CHECKED Then GUICtrlSetData($Checkbox1, "Running") Run("Admin.exe") Else GUICtrlSetData($Checkbox1, "Run Admin Programs") EndIf EndFunc ;==>Marker Func Marker2() If $Read = $GUI_CHECKED Then GUICtrlSetData($Checkbox2, "Running") Run("LowLevel.exe") Else GUICtrlSetData($Checkbox2, "Run LowLevel Programs") EndIf EndFunc ;==>Marker2 3. Code for Admin #RequireAdmin $Path = "C:\Program Files\Inkscape\inkview.exe" 4. Code for LowLevel $Path = "C:\Program Files\Inkscape\inkview.exe" 5. Compile the Admin and LowLevel scripts to an exe. 6. Compile the Master to an exe (optional) 7. Run the Master program...
    1 point
  7. That type of gui and control are created by visual basic if I remember correctly. Use the following to see if it helps.
    1 point
  8. Its strange that $Target.Value didn't work unless it was empty, but as AutoBert pointed out $Target variable is an Element Object so you would still need to treat it as an object see example below: nb: For the example please open https://supsystic.com/example/contact-us-form/ in IE first, then run the code below It should find the "Last Name" field using the attribute "name" Add "Subz" value to the "Last name" field Assign $oInput to $oTag Exitloop Print the $oTag "data-name" attribute to the console Print the $oTag "Value" to the console (should say "Subz") nb1: You normally can't use ".InnerText" with Inputs as these tags normally doesn't require closing aka </input>. nb2: You would still require to use "GetAttribute" with the object not just "Attribute" Hope that helps. #include <IE.au3> Global $oIE = _IECreate("https://supsystic.com/example/contact-us-form/", 1) Global $oInputs = _IETagNameGetCollection($oIE, "Input") If IsObj($oInputs) Then For $oInput in $oInputs If $oInput.GetAttribute("name") = "fields[last_name]" Then $oInput.Value = "Subz" $oTag = $oInput ExitLoop EndIf Next EndIf ConsoleWrite("$oTag Data-Name Attribute = " & $oTag.GetAttribute("data-name") & @CRLF) ConsoleWrite(StringStripWS("$oTag Value = " & $oTag.Value, 7) & @CRLF)
    1 point
  9. you can add the network share as a "Trusted Site". although it is designed for web sites, a network share is also supported. if you can do that via Group Policy (even local) as described here, i'd like to know, as i never tried that method before. or, you can wait for another update to fix this issue but screw other stuff, for your amusement. b.t.w look at the page describing this KB update, here. in the "Known issues in this update" section, it says: Symptom Workaround Some users running Windows 10 version 1803 may receive an error "An invalid argument was supplied" when accessing files or running programs from a shared folder using the SMBv1 protocol. Enable SMBv2 or SMBv3 on both the SMB server and the SMB client, as described in KB2696547. Microsoft is working on a resolution that will be available later in June. i find it hard to believe this is related, but it demonstrates how unimportant we are to Microsoft.
    1 point
  10. Try this logic: $bOk=False ;... $tags = $oIE.document.GetElementsByTagName("input") For $tag in $tags $class_value = $tag.GetAttribute("class") If string($class_value) = "fTs-p3298-l0 wplEditControl" Then MsgBox(0,$class_value,"itworked") $bOk=True ExitLoop EndIF Next if Not $bOk Then MsgBox(0,"","Error") $tag isn't a string it's a element. The attribute is already saved in $class_value as string.
    1 point
  11. v20100v

    Creating an installer

    Hi, I propose a solution to package an AutoIt application and create a Windows Installer with InnoSetup, as describe here : https://v20100v.github.io/autoit-gui-skeleton/documentation/creating-setup-package-autoit-application Some great features have been implemented within : Generate package (archive zip) and Windows setup. Support internationalization (i18n). Check if application is already install. Configure additional messages in the setup like: license agreement, prerequisites and history project. Add icons application into Windows start menu. Launch custom command after the end of the installation. Easy to customize and change graphic elements of the Windows installer (setup). A Windows batch is used to generate the Windows Setup (create output temp directory, compilation Au3, copy assets, and make setup with ISS script) Have Fun, ++
    1 point
  12. The seemingly wrong result is caused by AutoIt variables not being strongly typed. To work as expected one need to insert Int() everytime an operation yields a partial result as double, while in C when a variable is declared int and assigned a double result, casting to int is automagic.
    1 point
  13. You will need add $Pages = 0 to get it to restart the page count for example: #include <MPDF_UDF.au3> #include <String.au3> #include <Array.au3> #include <GDIPlus.au3> #include <ScreenCapture.au3> Global $_iImgWidth Global $_iImgHeight Global $sImagePath = "E:\Google Drive\Indesign PNG Export Watermark" Global $aPDFNames[4] = ["Bundle_1", "Bundle_2", "Bundle_3", "Bundle_4"] Global $aPDFImages[4][24] = [["1099","1100","1101","1006","1007","1008","1014","1015","1016","935","950","951","1090","1091","1092","1059","1060","1061","977","978","979","","",""],["1108","1109","1110","1122","1123","1124","1134","1135","1136","1148","1150","1149","1162","1163","1164","","","","","","","","",""],["770","771","772","807","808","809","835","848","849","813","814","815","","","","","","","","","","","",""],["2231","2243","2232","2218","2219","2220","2248","2250","2251","1808","1809","1816","1888","1889","1890","2048","2049","2050","","","","","",""]] For $i = 0 To UBound($aPDFNames) - 1 $_Buffer = "" ;~ Reset Buffer $_Images = "" ;~ Reset Resource Images $_Pages = 0 ;~ Reset Pages to 0 _SetTitle("Image2PDF") _SetSubject("Convert image(s) to pdf") _SetKeywords("pdf, AutoIt") _OpenAfter(False);open after generation _SetUnit($PDF_UNIT_CM) _SetPaperSize("CUSTOM", 595.276, 595.276); 8.5x8.5 _SetZoomMode($PDF_ZOOM_CUSTOM,90) _SetOrientation($PDF_ORIENTATION_PORTRAIT) _SetLayoutMode($PDF_LAYOUT_CONTINOUS) ConsoleWrite("Compiling - " & $aPDFNames[$i] & @CRLF) ;~ Initialize the PDF _InitPDF(@ScriptDir & "\"& $aPDFNames[$i] & ".pdf") _SelectImages($i) ;~ then, finally, write the buffer to disk _ClosePDFFile() Next Func _SelectImages($_iPDFImageIndex) Local $aImgSize, $iImgHeight, $iImgWidth ;~ === Load resources used in pdf === For $j = 0 To UBound($aPDFImages, 2) - 1 ConsoleWrite("Adding - img" & $j & ": " & $sImagePath & "\preview" & $aPDFImages[$_iPDFImageIndex][$j] & ".png" & @CRLF) _LoadResImage("img" & $j, $sImagePath & "\preview" & $aPDFImages[$_iPDFImageIndex][$j] & ".png") $aImgSize = _GetImageSize($sImagePath & "\preview" & $aPDFImages[$_iPDFImageIndex][$j] & ".png") Select Case $aImgSize[0] > $aImgSize[1] $iImgWidth = 17 $iImgHeight = 21 $xImgCoord = 2 $yImgCoord = .5 Case $aImgSize[0] < $aImgSize[1] $iImgWidth = 21 $iImgHeight = 17 $xImgCoord = 0 $yImgCoord = 1.3 Case $aImgSize[0] = $aImgSize[1] $iImgHeight = 21 $iImgWidth = 21 $xImgCoord = 0 $yImgCoord = 0 EndSelect _BeginPage() _InsertImage("img"& $j, $xImgCoord, $yImgCoord ,$iImgWidth, $iImgHeight) _EndPage() Next EndFunc Func _GetImageSize($sImageName) Local $_aImgSize[2] _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile($sImageName) $_aImgSize[0] = _GDIPlus_ImageGetWidth($hImage) $_aImgSize[1] = _GDIPlus_ImageGetHeight($hImage) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() Return $_aImgSize EndFunc
    1 point
  14. @CaptainBeardsEyesBeard, You are asking on how to ticked and unticked these checkboxes, so it would be this way (example from help file): #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() ; Create a GUI with various controls. Local $hGUI = GUICreate("Example", 300, 200) ; Create a checkbox control. Local $idCheckbox = GUICtrlCreateCheckbox("Standard Checkbox", 10, 10, 185, 25) Local $idClose = GUICtrlCreateButton("Close", 210, 170, 85, 25) ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idClose ExitLoop Case $idCheckbox If _IsChecked($idCheckbox) Then MsgBox($MB_SYSTEMMODAL, "", "The checkbox is checked.", 0, $hGUI) Else MsgBox($MB_SYSTEMMODAL, "", "The checkbox is not checked.", 0, $hGUI) EndIf EndSwitch WEnd ; Delete the previous GUI and all controls. GUIDelete($hGUI) EndFunc ;==>Example Func _IsChecked($idControlID) Return BitAND(GUICtrlRead($idControlID), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked Now if you want something aside from ticking these checkboxes, please elaborate more on your concern so that we can provide more suggestions and if possible to help you more.
    1 point
  15. Slight modification of @FrancescoDiMuro code (see $arrFileVersion) this will place the files with a valid file version into an array. #include <AutoItConstants.au3> #include <File.au3> #include <FileConstants.au3> Local $strDirListFile = @ScriptDir & "\DirList.txt", _ ; Directory from which read the file $arrDirList, _ ; Array which contains the list of directories read from $strDirListFile $arrFileList, _ ; Array which contains the list of files for each directory $strFileVersion, _ ; File version of the file $arrFileVersion[1][2] ; Read the content of the file $strDirListFile, and the result is stored in $arrDirList _FileReadToArray($strDirListFile, $arrDirList, $FRTA_NOCOUNT) ; Always check for errors when you code! It helps a lot! If @error Then ConsoleWrite("Error while obtaining the content of the file " & $strDirListFile & ". Error: " & @error & @CRLF) Else _ArrayDisplay($arrDirList, "Dir List") ; Now that the result of $arrDirList is stored correctly, we can loop through it and obtain the list of files in each directory, ; using the _FileListToArray() function For $i = 0 To UBound($arrDirList) - 1 $arrFileList = _FileListToArray($arrDirList[$i], "*", $FLTA_FILES, True) If @error Then ConsoleWrite("Error while obtaining the list of files in the directory " & $arrDirList[$i] & ". Error: " & @error & @CRLF) Else _ArrayDisplay($arrFileList, "File List in the Dir: " & $arrDirList[$i]) ; Now that the list of files in the $arrDirList[$i] directoy has been stored correctly, you can get the info of them, ; one by one, using the FileGetVersion() function For $j = 1 To UBound($arrFileList) - 1 $strFileVersion = FileGetVersion($arrFileList[$j]) ; As it is reported in the Help file: ; If FileGetVersion() returns 0.0.0.0 or "", then, there are no information about what you were trying to obtain If @error Then ConsoleWrite("No information availables from the file " & $arrFileList[$j] & @CRLF) Else ; Finally, get the list of information about the file ( you can either get one information at time ), ; specifying it as second parameter of the function FileGetVersion() ( look in the Help fil ) ConsoleWrite("File version of the file " & $arrFileList[$j] & " - " & $strFileVersion & @CRLF) _ArrayAdd($arrFileVersion, $arrFileList[$j] & "|" & $strFileVersion) EndIf Next EndIf Next $arrFileVersion[0][0] = UBound($arrFileVersion) - 1 EndIf _ArrayDisplay($arrFileVersion)
    1 point
  16. usera

    PSexec MSI MST

    Thanks SUBZ and Earthshine, it working now, I did wrong typo. Thanks !!! thanks!!!
    1 point
  17. Good morning @vyeshaun, and welcome to the AutoIt forum First, I would like to point you out about the indentation of your code, and some little things at which you should pay a little more attention. First, the global variable $Files should not be in a function, just because you use local variables in it. Second, you don't have a For...Loop in another For...Loop, because the first Next, closes the For...Loop, and the second one is the same. Third, the declaration of $DirList... Just write $DirList, and you're ok. Same for $DirListFile... No needs to put parentheses to the declaration. To point you out on the logic of your script, when you have read all the Directories, you have to loop through that array, and obtain a list of files, and then, for each file, get the version through the FileGetVersion() function Hope that helps EDIT: I think that you just started using AutoIt, so, I would suggest you, to read the Help file, in order to learn a bit about AutoIt EDIT2: By the way, here you are a little script ( commented ), which I hope it will help you and will encourage you to use this powerful language which AutoIt is #include <AutoItConstants.au3> #include <File.au3> #include <FileConstants.au3> Local $strDirListFile = @ScriptDir & "\DirList.txt", _ ; Directory from which read the file $arrDirList, _ ; Array which contains the list of directories read from $strDirListFile $arrFileList, _ ; Array which contains the list of files for each directory $strFileVersion ; File version of the file ; Read the content of the file $strDirListFile, and the result is stored in $arrDirList _FileReadToArray($strDirListFile, $arrDirList, $FRTA_NOCOUNT) ; Always check for errors when you code! It helps a lot! If @error Then ConsoleWrite("Error while obtaining the content of the file " & $strDirListFile & ". Error: " & @error & @CRLF) Else _ArrayDisplay($arrDirList, "Dir List") ; Now that the result of $arrDirList is stored correctly, we can loop through it and obtain the list of files in each directory, ; using the _FileListToArray() function For $i = 0 To UBound($arrDirList) - 1 $arrFileList = _FileListToArray($arrDirList[$i], "*", $FLTA_FILES, True) If @error Then ConsoleWrite("Error while obtaining the list of files in the directory " & $arrDirList[$i] & ". Error: " & @error & @CRLF) Else _ArrayDisplay($arrFileList, "File List in the Dir: " & $arrDirList[$i]) ; Now that the list of files in the $arrDirList[$i] directoy has been stored correctly, you can get the info of them, ; one by one, using the FileGetVersion() function For $j = 1 To UBound($arrFileList) - 1 $strFileVersion = FileGetVersion($arrFileList[$j]) ; As it is reported in the Help file: ; If FileGetVersion() returns 0.0.0.0 or "", then, there are no information about what you were trying to obtain If @error Then ConsoleWrite("No information availables from the file " & $arrFileList[$j] & @CRLF) Else ; Finally, get the list of information about the file ( you can either get one information at time ), ; specifying it as second parameter of the function FileGetVersion() ( look in the Help fil ) ConsoleWrite("File version of the file " & $arrFileList[$j] & " - " & $strFileVersion & @CRLF) EndIf Next EndIf Next EndIf Best Regards.
    1 point
  18. Ok, let's pause for a minute. You're sounding more and more like you are spamming a site. So I am going to reinstate my previous questions: What site, and what exactly are you trying to do? We are not going to assist in something that breaks the TOS or rules of a site.
    1 point
  19. BrewManNH

    Check Gmail Emails

    Here's why Switch @error Case 4 MsgBox(16,"text error!","Maximum text legth breached!") EndSelect ; <<<<<<<<<<<<<< Should be EndSwitch
    1 point
×
×
  • Create New...