Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Well I haven't tried making my own script yet. That's why I'm wondering if it's possible to fix my problem.
  3. Today
  4. @DanielPaleto this forum is dedicated to helping people with their own scripts; it is not a place where you put in an order and someone barfs up the code for you. What have you tried on your own? Edit: You could also provide more information - what is this application? why does it "disappear"? where are you downloading from? What is the size of the file once downloaded? etc. etc., The more detail you give the better people can assist.
  5. Ok so I have to download this program to my computer everytime I turn on my laptop because for some reason it deletes it. I have to wait until the program hits 100% until u can click open. Is there a way to automate that? If so can you help me. It will make my life way much easier. Thank you!
  6. Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team
  7. Sorry my title is help I couldn't turn it into a title but I am wondering if you were able to automate something and it has to wait until it is finished. For example I have. To kill 1000 mobs to be able to turn it in. Its just an example but is there a way to wait for it to kill 1000 mobs then turn it in or no. If there can you help me with it. Thank you.
  8. Yesterday
  9. PS: i do not how it turned out to be red when i pasted my code there lol but it runs of me here no problem
  10. Hello Guys. I have finally finished it thank to your help. thank you so much for your help. I went it in tried both of ur approach but ended up using Subz approach as im still not familiar on how do events work but any ways thanks for all the help and support. Here is the finished code that u guys helped me finish #include <Array.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <FileConstants.au3> #include <Misc.au3> #include <WinAPIFiles.au3> Global $g_iButtonCount = 0 Global $FieldCount = 1 Global $Dir = @ScriptDir&"\"&"Settings.ini" ;~ First Browse Button Top Location Global $g_iTop = 112 Global $g_aBrowse[0][2], $g_sBrowseFolder, $g_sSelectFolder, $g_sBrowseFields Global $g_hMainForm = GUICreate("Auto Backup", 453, 180, 900, 247) Global $g_sBackupLocation = GUICtrlCreateLabel("Location of the Backup Folder:", 8, 8, 169, 19) GUICtrlSetFont($g_sBackupLocation, 10, 400, 0, "Calibri") GUICtrlSetResizing($g_sBackupLocation,$GUI_DOCKALL) Global $g_idBrowseButton = GUICtrlCreateButton("Browse", 8, 32, 65, 17) GUICtrlSetResizing($g_idBrowseButton,$GUI_DOCKALL) Global $g_idBrowseField = GUICtrlCreateEdit("", 80, 32, 329, 17, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) GUICtrlSetResizing($g_idBrowseField,$GUI_DOCKAlL) Local $BackupFolderRead = IniRead ($Dir, "Direct", "BackUpDirectory", "" ) GUICtrlSetData($g_idBrowseField,$BackupFolderRead) Global $g_idFolderBackup = GUICtrlCreateLabel("Locations of the Folder to be Backup:", 8, 80, 205, 19) GUICtrlSetFont($g_idFolderBackup, 10, 400, 0, "Calibri") GUICtrlSetResizing($g_idFolderBackup,$GUI_DOCKALL) Global $g_idBackupButton = GUICtrlCreateButton("OK", 200, 144, 73, 25) Global $g_idExpandButton = GUICtrlCreateButton("+", 416, 112, 17, 17) GUICtrlSetResizing($g_idExpandButton,$GUI_DOCKALL) ;~ Add the first Browse/Field Controls AddField() GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $g_idExpandButton If $g_iButtonCount <= 3 Then ExpandGUI() AddField() $g_iButtonCount += 1 Else MsgBox($MB_SYSTEMMODAL, "Notice", "Maximum Number of Locations Reached") EndIf Case $g_idBrowseButton Local $BackupFolder = DirectoryBrowse() GUICtrlSetData($g_idBrowseField,$BackupFolder) Case $g_idBackupButton DataToIni() IniWrite($Dir,"Direct","IterationNumber",$FieldCount - 1) GUIDelete($g_hMainForm) Exit Case Else If $nMsg == 9 Then $g_sSelectFolder = DirectoryBrowse() GUICtrlSetData($g_aBrowse[0][1], $g_sSelectFolder) ElseIf $nMsg == 11 Then $g_sSelectFolder = DirectoryBrowse() GUICtrlSetData($g_aBrowse[1][1], $g_sSelectFolder) ElseIf $nMsg == 13 Then $g_sSelectFolder = DirectoryBrowse() GUICtrlSetData($g_aBrowse[2][1], $g_sSelectFolder) ElseIf $nMsg == 15 Then $g_sSelectFolder = DirectoryBrowse() GUICtrlSetData($g_aBrowse[3][1], $g_sSelectFolder) ElseIf $nMsg == 17 Then $g_sSelectFolder = DirectoryBrowse() GUICtrlSetData($g_aBrowse[4][1], $g_sSelectFolder) EndIf EndSwitch WEnd Func ExpandGUI() Local $GuiPosition = WinGetPos($g_hMainForm) ; Get the GUI coördinates WinMove($g_hMainForm, "", $GuiPosition[0], $GuiPosition[1], $GuiPosition[2], $GuiPosition[3] + 30) EndFunc Func AddField() Local $iArrayAdd = _ArrayAdd($g_aBrowse, GUICtrlCreateButton("Browse", 8, $g_iTop, 65, 17) & "|" & GUICtrlCreateEdit("", 80, $g_iTop, 329, 17, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN))) GUICtrlSetResizing($g_aBrowse[$iArrayAdd][0],$GUI_DOCKALL) GUICtrlSetResizing($g_aBrowse[$iArrayAdd][1],$GUI_DOCKAlL) $g_iTop += 28 Local $BackupLocationRead = IniRead ($Dir, "Direct", "Location" &$FieldCount, "" ) GUICtrlSetData(-1,$BackupLocationRead) $FieldCount = $FieldCount + 1 EndFunc Func DirectoryBrowse() Local $num = 1 ; Create a constant variable in Local scope of the message to display in FileSelectFolder. Local Const $sMessage = "Select a folder" ; Display an open dialog to select a file. Local $sFileSelectFolder = FileSelectFolder($sMessage, "") If @error Then ; Display the error message. ; MsgBox($MB_SYSTEMMODAL, "", "No folder was selected.") Else ; Display the selected folder. ; MsgBox($MB_SYSTEMMODAL, "", "You chose the following folder:" & @CRLF & $sFileSelectFolder) EndIf Return $sFileSelectFolder EndFunc Func DataToIni() Local $Location,$BackupDirectory,$Counter For $Counter = 1 To $FieldCount-1 Step + 1 $Location = GUICtrlRead($g_aBrowse[$Counter -1][1]) IniWrite($Dir,"Direct","Location" &$Counter,$Location) Next $BackupFolder = GUICtrlRead($g_idBrowseField) IniWrite($Dir,"Direct","BackUpDirectory",$BackupFolder) EndFunc and this one is for the actual backing up of the files which is runned by the Task Scheduler #include <ButtonConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <FileConstants.au3> #include <Misc.au3> #include <Date.au3> #include "Notify.au3" Opt("TrayAutoPause", 0) Local $return Local $Dir = @ScriptDir&"\"&"Settings.ini" Local $Location[5] Local $Loc Local $IterationCount = IniRead($Dir,"Direct","IterationNumber","") Local $Counter = 0 Local $FileName For $Counter = 0 To $IterationCount-1 Step +1 $Location[$Counter] = IniRead($Dir,"Direct","Location" &$Counter+1,"") Next For $Counter = 0 To $IterationCount-1 Step +1 $Loc = $Location[$Counter] $FileName = StringSplit($Loc,'\', $STR_ENTIRESPLIT) Local $iFileExists = FileExists($Loc) If $iFileExists Then Backup($Loc,$FileName[$FileName[0]]) Else EndIf Next _Notify_Show(@AutoItExe, "Backup Succesfull", "Retracts after 5 secs", 5, 0) Sleep(5000) Exit Func Backup($loc,$Name) Local $time = _NowTime(5) Local $date = _NowDate() $date = StringReplace($date, "/", "-") $time = StringReplace($time, ":", "-") Local $DateTime = $date &" "& $time &" "&$Name Local $FileName = String ($DateTime) Local $to = IniRead ($Dir, "Direct", "BackUpDirectory", "" ) ;asa i save $loc = $loc & "\" $to = $to & "\" $BackUpLocation = $to &""& $FileName ;asa i save plus filename RunWait (@ComSpec & ' /c ""%ProgramFiles%\WinRaR\Rar.exe" a -ep1 -r -y "' &$BackUpLocation& '" "' & $loc& '"',"",@SW_HIDE) if @error then Exit EndIf Sleep(3000) EndFunc Sorry if code is messy im just getting the hang out of this. anyway thanks all for ur help
  11. So I had this Idea on making a chrome History logger in which it saves History to a external like a .txt or .ini whatever works 🙂. I wanna make cuz to keep record of the users search history in case they clear the chrome history. Incognito window wont be an issue as i have found a way to disable it. i have tried backing up the History file initially but for realized its impractical due to having a a lot of history file saves at the end of the day and u need sql tools to actually open it. So i have decided to copy the URL instead and save them somewhere else as it would be readable and easy access for me. My problem now is I cant find a function that does that. In my digging i found about pressing F6 and copying the URl but i have alot of issue about it just by thing on doing it like the user Noticing it etc. There is this UI automation too but sadly its too advance for me as i have only started autoit Not so long ago. I hope some helps and points me towards a direction i just want to get that URl thats all
  12. I Danny, Nice to hear from you. I have been testing with the exe. I don't see the /props command line option. RunWait('"C:\Dnload\9xAddons\VNC UltraVNC_1_2_24_X86_Setup2.exe" /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent, @TempDir') I have been trying to get this to run: RunWait('@ComSpec & " /c "C:\Dnload\9xAddons\VNC UltraVNC_1_2_24_X86_Setup2.exe" /loadinf="VNCConfig.ini" /very silent, @TempDir') RunWait('regsvr32 /s "' & @ScriptDir & '\VNCsetup.reg"') Nothing runs. No errors. I'm trying to run this in Win10 64bit
  13. Sorry but the UI automaton is too advance for me to understand. I just started using autoit not so long ago
  14. @Docfxit There are two UltraVnc installation packages. One of the installation package is the .msi which NOT support /loadinf and /props switches. The second installation package is the .exe which support /loadinf and /props switches.
  15. @Jojo-OP2, So that code does indeed work and I can make it error by mistyping the title name. However, it only clicks correctly when the window is maximized. If I shrink the window at all, it doesn't find the new location. Thoughts?
  16. I'm sure you are correct. The question is how to get the syntax correct so the options get passed to the Program being installed and not msiexec.exe
  17. I added a working directory: Local $iReturn = RunWait('msiexec /i "' & @ScriptDir & '\VNC UltraVnc_1224_X64.msi" /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent', @TempDir) I'm still getting the Windows Installer error window.
  18. if your @ScriptDir has spaces in it, you need to enclose it with double-quotes, like this: Local $iReturn = RunWait('msiexec /i "' & @ScriptDir & '\VNC UltraVnc_1224_X64.msi" /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent ' ) you may also want to specify the working directory, the 2nd parameter for RunWait(), to your @ScriptDir, if the ini and reg files are there. also, replace /silent with /quiet see here: EDIT: @Docfxit, i think there is a confusion between the msiexec.exe command line arguments, and the specific VNC installer arguments. your command passes those arguments to the msiexec, which does not support /loadinf and /props. the latter should be passed to the .exe installer, not to the .msi - see here: http://www.uvnc.com/install/installation.html scroll down all the way to the "Automate Installation" section.
  19. When I run this test: Local $iReturn = RunWait('msiexec /i ' & @ScriptDir & '\VNC UltraVnc_1224_X64.msi /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent ' ) I get the Windows Installer window. NOTE: I can't upload any more screen prints. I keep getting an error saying: You are only allowed to upload 51.2kb even though the screen prints are 21kb.
  20. When I run this test, I get this: Local $iReturn = RunWait('msiexec.exe /i "\\@ScriptDir & \VNC UltraVnc_1224_X64.msi" /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent')
  21. as @buymeapc said, you are not escaping your strings properly. look at the colors, they are here for a reason. also, you need to remove the double-backslash before @Scriptdir. it has no business being there. do that to his solution and run, see what you get.
  22. When I run it I get this: Local $iReturn = ShellExecuteWait(@ScriptDir & \VNC UltraVnc_1224_X64.msi, '/loadinf=VNCConfig.ini /props=VNCsetup.reg /silent')" C:\Dnload\9xAddons\~Test2.au3"(5,6) : error: syntax error (illegal character) Localï~~~~~^ "C:\Dnload\9xAddons\~Test2.au3"(5,6) : error: Statement cannot be just an expression. Localï~~~~~^
  23. Can't test at the moment but could you please try: Local $iReturn = RunWait('msiexec.exe /i "\\@ScriptDir & \VNC UltraVnc_1224_X64.msi" /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent') or Local $iReturn = ShellExecuteWait(@ScriptDir & \VNC UltraVnc_1224_X64.msi, '/loadinf=VNCConfig.ini /props=VNCsetup.reg /silent')
  24. 1639 stands for Taken from: https://docs.microsoft.com/en-us/windows/desktop/debug/system-error-codes--1300-1699-
  25. Local $iReturn = RunWait('msiexec /i \\@ScriptDir & \VNC UltraVnc_1224_X64.msi /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent ' ) Returns 1639 Local $iReturn = ShellExecuteWait('@ScriptDir & \VNC UltraVnc_1224_X64.msi /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent') Returns 0
  26. Local $iReturn = RunWait('msiexec /i \\@ScriptDir & \VNC UltraVnc_1224_X64.msi /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent ' ) I think you're missing an extra quote here. Local $iReturn = RunWait('msiexec /i \\' & @ScriptDir & '\VNC UltraVnc_1224_X64.msi /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent ' ) More importantly, what happens when you type msiexec.exe into a command prompt? You should get a "Windows Installer" window with command line options.
  1. Load more activity
  • Create New...