Jump to content

Search the Community

Showing results for tags 'windows 7'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

  1. Hi folks, I'm having problems with a screenshot capture script. Let me explain. Everyday I (and my colleagues at work) need to take some screenshots from a web-page. These screenshots are used to compile a report. Normally, I (and others) used to log in into the website and took screenshots of desired graphics and tables. This is tediuos and time consuming. To easy this task I made a script using autoit that basically logs into the website (user and password) and using some clicks, stroke send, coordinates, it is able to generate the graphics and save them to some folders into our network (this script saves arouund 50 pics. It works like a sharm. In order to make things easier, I tried to schedule this script (compiled to a Screnpics.exe file) using task scheduler from windows. We already use this (task scheduler) to run some vbs scripts, some vba excel scripts and so on. The computer used for this tasks is a windows 7 desktop computer. Due to security policies, the computer locks after some time. All this tasks run in the locked computer. My script screenpics.exe runs also from this locked computer. When the computer is unlocked, it does everything as expected. But, when it is locked, all the "pics" are BLACK. As I understand, it runs ok, but, as the "windows" are innactive, it prints what it "sees": a black rectangular. Some details: The web-page with hold the information I need, it only works in Firefox and, because of this it couldn`t be managed by vba or some "getobject" like commands. In fact, it has some flash things that make it impossible to control programatically. So my script is based on mouse move to coordinates, mouse click, screen capture and so one. So, I read many posts trying to figure out a way to overcome this, but... nothing came to mind. My first idea was try to unlock windows. Theses lead me to some posts with no solution. This is worse because I'm not a computer admin, so procedures that need to replace/change the register are not an option. If someone has any idea, I'll be gratefull.
  2. I/O Port Functions UDF Windows 7 and x64-compatible! This is a simple I/O (Input/Output) UDF for interacting with ports. The ability to write to ports was stripped from Windows with Vista+. While many do not miss this ability, there are some uses still in existence: Re-enable the internal PC Speaker - the good ol' "Beep" function can be restored using basic I/O PS/2 Keyboard Functions - Turn it off/on, mess with LED's, inject keys into the keyboard output stream - even thwart UAC prompts! =O Also work with Parallel, Serial (COM), PS/2 mouse, and miscellaneous ports that devices interface through using I/O operations For some good lists of ports and programming, see: PORTS.LST Chapters from 'The Art of Assembly Language': 20: The PC Keyboards - Part One and Part Two 21: The PC Parallel Ports - Part One, Part Two, and Part Three 22: The PC Serial Ports - Part One and Part Two 23: The PC Video Display 24: The PC Game Adapter - Part One, Part Two, Part Three and Part Four On the PS/2 Keyboard and PS/2 Mouse, some more links: 8042 Keyboard Controller 8042 Keyboard Commands & Responses Keyboard Controller Commands, Keyboard Commands and Keyboard Scancodes The PS/2 Mouse The I/O DLL's, which will install the I/O drivers (they are embedded as a resource in the DLL), come from Phillip Gibbons. His webpage, where more information, and extra downloads are, is available here: InpOut32 and InpOutx64. Note: everything you need is already included in my UDF. IOInstallx86 and IOInstallx64 are included to help with the install. Run these once to install the DLL's and drivers. (Administrator rights are required!) In addition to the base _IOFunctions UDF, I've included _IOBeep, which is based on trancexx's _Beep function, and _IOKeyboardFunctions [PS/2 only*]. There are now three examples of the UDF usage included: IOBeepExample, IOCMOSReadExample (based on trancexx's CMOS code), and IOKeyboardExamples. If anyone else has more code suggestions, feel free to add to the thread. *Update: Some BIOS's allow Legacy USB Port 64/60 Emulation, which may allow the _IOKeyboardFunctions to work for USB (non-PS/2) Keyboards, though this is untested thus far. While I bundle the binaries with my code, remember they are not my own. However, they are released as freeware. To ensure proper credit goes where it belongs, I've included the Readme files from the download (linked above), as well as a link to the original page. Ascend4nt's AutoIT Code License agreement Screw silly licenses. Just make sure you remember the people you get free stuff from! IOFunctions.zip UPDATES: 07/11/2013: - Updated to use (and install) v1.5.0.0 of InpOut32 & InpOutx64 - Version check & compare before install - Fixed links - Tiny bug fixes InpOut32 and InpOutx64 ChangeLog: v1.5.0.0 New Build (20-Jan-2011): - Added _stdcall to DlPortReadPortUshort, DlPortWritePortUshort, DlPortReadPortUlong, DlPortWritePortUlong to maintain compatibility with old DLPortIO driver. v1.4.0.0 New Build (13-Jan-2011): - Removed references to WinRing0 which was discontinued. - Fixed uninitialized buffers & return from Inp32 > byte value! v1.3.0.0 New Build (15-Aug-2010): - Removed bool's from header (replaced with BOOL). This is to maintain compatibility with other DLL’s (DLPortIO etc.). 10/22/2010: Added _IOKeyboardFunctions UDF Added IOKeyboardExamples and IOCMOSReadExample (based on trancexx's CMOS code)
  3. Hi all, I'm trying to automate the install of a specific networking device. All goes well, I can install the driver on both Windows 7 & 10, rescan for hardware, set the IP-settings and all, but there's one issue. In Windows 10, I can disable all connection protocols using Powershell, but Windows 7 does not offer this Powershell-Cmdlet. So I programmed a way (two years ago) to let AutoIt open the network-adapter properties and then deselect all checkboxes except for the TCP/IP-V4. I recovered this snippet somewhere in my old files and tried to reintegrate this into my latest script, but it doesn't seem to work. On Windows 10 I get a blank screen for a few seconds and that's it, on Windows 7 it makes explorer crash. I think it's quite safe to test this on your own system as long as you're not using IPv6 to connect to the internet and as long as you return to check all the boxes again (so you don't break your connectivity). If anyone has any idea, I'd be glad to hear from you! Thanks in advance and stay safe in these Corona-ridden times 🙂 Kind regards, Jan There are three functions involved: DisableAllProtocols($AdapterName) This one is the main function that 'should' uncheck all the checkboxes in the adapter's Properties-window. Func DisableAllProtocols($AdapterName) OpenNetConnToAdapter($AdapterName) ;Find the IDs of all relevant controls Local $Handle_Window_Properties = WinWaitActive($Adaptername & " Properties","") Local $Handle_Listview_Protocols = ControlGetHandle($Adaptername & " Properties","","[CLASSNN:SysListView321]") Local $Handle_OK_Button = ControlGetHandle($Adaptername & " Properties","","[CLASSNN:Button6]") Local $List_CMN_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Client for Microsoft Networks") Local $List_FPSMN_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","File and Printer Sharing for Microsoft Networks") Local $List_QOS_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","QoS Packet Scheduler") Local $List_MNAMP_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Microsoft Network Adapter Multiplexor Protocol") Local $List_MLLDPPD_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Microsoft LLDP Protocol Driver") Local $List_IPV6_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Internet Protocol Version 6 (TCP/IPv6)") Local $List_LLTDR_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Link-Layer Topology Discovery Responder") Local $List_LLTDMIOD_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Link-Layer Topology Discovery Mapper I/O Driver") ; Disable All Protocols Except IPV4 SetCheckboxState($Handle_Listview_Protocols,$List_CMN_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_FPSMN_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_QOS_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_MNAMP_ID,3) SetCheckBoxState($Handle_Listview_Protocols,$List_MLLDPPD_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_IPV6_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_LLTDR_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_LLTDMIOD_ID,3) ;Click OK ControlClick($Handle_Window_Properties,"","Button6") Sleep(50) WinClose("Network Connections") EndFunc OpenNetConnToAdapter($AdapterName) This function opens the network adapter's Properties-page Func OpenNetConnToAdapter($AdapterName) ShellExecute("control.exe","ncpa.cpl",@WindowsDir,"",@SW_SHOW) WinWait("Network Connections","") WinActivate("Network Connections","") Local $Handle_Window_NetworkConnections = WinWaitActive("Network Connections","") Send("{F5}") Sleep(250) Local $AdapterNameArray = StringSplit($AdapterName,"") For $i = 1 To $AdapterNameArray[0] Step 1 Send($AdapterNameArray[$i]) Sleep(10) Next Sleep(50) Send("{APPSKEY}") Sleep(50) Send("{R}") Sleep(500) Return EndFunc SetCheckboxState($Handle,$checkbox_id,$wantedstate) This function changes the state of a checkbox Func SetCheckboxState($handle,$checkbox_id,$wantedstate) ;$handle : SysListView32-handle ;$checkbox_id : The ID of the checkbox you want to control ;$wantedstate : The wanted status (2 for checked, 3 for unchecked) Local $currentstate = _GUICtrlListView_GetItemStateImage($handle,$checkbox_id) If $currentstate = $wantedstate Then Return Else _GUICtrlListView_SetItemSelected($handle,$checkbox_id,True,True) Send("{Space}") Sleep(50) Return EndIf EndFunc
  4. Hi All, Once again returning back to this great community for much needed help. I am sure that I wont be disappointed and you guys will point me in the right direction. To begin with, I am very new here and I have been learning AutoIT. Few months ago I was able to write a script to automate a program to perform some desired task and it has been working great. But, all hell broke lose when I moved this to a Windows 7 VM the script wont even perform the first key commands and after few changes in the code it started working but break intermittently also the compiled scripts wont work at all. Any help will be much appreciated.
  5. Hello all, Been looking for and playing around with a script that would prompt me for a UserName and Password then Map a network drive. I have included the code: #AutoIt3Wrapper_icon=your_icon.ico #AutoIt3Wrapper_Run_Obfuscator=y #obfuscator_parameters=/striponly #NoTrayIcon #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Connect To Your Drive", 265, 135) $username_id = GUICtrlCreateInput("", 88, 16, 153, 21) $password_id = GUICtrlCreateInput("", 87, 44, 153, 21, $ES_PASSWORD) GUICtrlCreateLabel("&Username", 24, 16, 52, 17) GUICtrlCreateLabel("&Password", 26, 46, 50, 17) $connect = GUICtrlCreateButton("&Connect", 24, 80, 217, 33, BitOr($GUI_SS_DEFAULT_BUTTON, $BS_DEFPUSHBUTTON)) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $connect $username = GUICtrlRead($username_id) $password = GUICtrlRead($password_id) If $username = '' Or $password = '' Then MsgBox(16, 'Error', 'Empty username or password') ContinueLoop EndIf If DriveMapGet("X:") <> '' Then ; very fast MsgBox(16, 'Error', 'The device is already assigned') ContinueLoop EndIf GUISetCursor(15,1) DriveMapAdd("X:", "\\Server\share\filestore\" & $username, 0, $username, $password) ; slow If @error Then Switch @error Case 1 $err_message = 'Undefined / Other error. Windows API return code: ' & @extended Case 2 $err_message = 'Access to the remote share was denied' Case 3 $err_message = 'The device is already assigned' Case 4 $err_message = 'Invalid device name' Case 5 $err_message = 'Invalid remote share' Case 6 $err_message = 'Invalid password' EndSwitch GUISetCursor(2) MsgBox(16, 'Error', $err_message) Else ; everything OK Exit EndIf EndSwitch WEnd When I attempt the build I get the following: Obfuscator support has been discontinued and is replaced by Au3Stripper using "#Au3Stripper_" directives. ! The directive to run Au3Stripper is: #AutoIt3Wrapper_Run_Au3Stripper=y ; Default is n ! #Au3Stripper_Parameters options are: /pe : Replace and reference to a Global Const variable with its actual value. /tl : Create Au3Stripper.Log with a trace of all actions. /debug: add Debug information to Au3Stripper.Log. /so : This is the default when no parameters are provided. same as /sf + /sv /sf : Strip all unused Func's /sv : Strip all unused Global var records. /mo : Just merges the Include files into the source and strips the Comments. This is similar to aut2exe and helps finding the errorline. /mi : Sets the maximum Iterations Au3Stripper will perform. Default is 5. /rm : Rename Variables and Functions to a shorter name. /rsln: Replace @ScriptLineNumber with the actual line number. /Beta: Use Beta Includes. - Icon not found: your_icon.ico ==> Changing to default ICON. >Running AU3Check (3.3.14.5) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\Migue\Documents\Sync\Batches and Scripts\WDW-Scripts\SMS.au3 +>18:28:11 AU3Check ended.rc:0 >Running Au3Stripper (18.708.1148.0) from:C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper cmdline: - 0.22 Iteration 1 Strip Functions result: Output 1050 lines, stripped 0 Func lines and 234 Commentlines - 0.61 Iteration 2 Strip Variables result: Output 88 lines and stripped 962 lines - 0.63 Iteration 3 Strip Variables result: Output 58 lines and stripped 30 lines - 0.64 Iteration 4 Strip Variables result: Output 52 lines and stripped 6 lines - 0.66 Iteration 5 Strip Variables result: Output 51 lines and stripped 1 lines +> Source 1285 lines 48435 Characters. +> Stripped 999 Func/Var lines and 234 comment lines, Total 46893 Characters. +> Saved 95% lines 96% Characters. +> Au3Stripper v18.708.1148.0 finished created:C:\Users\Migue\Documents\Sync\Batches and Scripts\WDW-Scripts\SMS_stripped.au3 +>18:28:12 Au3Stripper ended.rc:0 >Running AU3Check (3.3.14.5) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\Migue\Documents\Sync\Batches and Scripts\WDW-Scripts\SMS_stripped.au3 +>18:28:12 AU3Check ended.rc:0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe /in "C:\Users\Migue\Documents\Sync\Batches and Scripts\WDW-Scripts\SMS_stripped.au3" /out "C:\Users\Migue\AppData\Local\AutoIt v3\Aut2exe\~AU495C.tmp.exe" /nopack /comp 2 +>18:28:13 Aut2exe.exe ended.C:\Users\Migue\AppData\Local\AutoIt v3\Aut2exe\~AU495C.tmp.exe. rc:0 !>18:28:13 Problem copying file from: C:\Users\Migue\AppData\Local\AutoIt v3\Aut2exe\~AU495C.tmp.exe To :C:\Users\Migue\Documents\Sync\Batches and Scripts\WDW-Scripts\SMS.exe +>18:28:14 AutoIt3Wrapper Finished. >Exit code: 0 Time: 3.046 When I attempt to run the executable I get the following: Many thanks in advance
  6. Has anybody else noticed that Windows 7 reacts ignorantly when you use the Windows key + arrow key shortcuts on a GUI with GUIEventMode set to 1? I discovered this recently when I was working on an app where I wanted complete control over the maximize/minimize buttons. Just give it a spin: #include <GUIConstants.au3> Opt('GUIEventOptions', 1) $hGUI = GUICreate('', 300, 200, Default, Default, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX)) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_MAXIMIZE ToolTip('Maximized') Case $GUI_EVENT_MINIMIZE ToolTip('Minimized') Case $GUI_EVENT_RESTORE ToolTip('Restored') Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Run that, then hit Win+Up or Win+Down. None of those events get triggered, and it still maximizes/minimizes. Although I can't get it to restore down from a maximize unless the window is also resizable ($WS_THICKFRAME in the style). Is there a way to stop Windows from doing what it wants or is the only option to check with WinGetState() and then change it back? Windows 10 seems to respect my settings, and I don't have any other versions to test on.
  7. I have a script that just adds some keyboard shortcuts for things like displaying the current song and artist, moving the window to the side so it won't pop up in my way, and play/pause, next song, previous song (these are the only 3 to still work since they don't need the window handle.) In some update recently, Spotify's window class swapped from "[CLASS:SpotifyMainWindow]" to "[CLASS:Chrome_WidgetWin_0]". Using the new class in my controls doesn't seem to work, I've tried getting the window handle from the process handle (_GetHwndFromPID($PID)) but that seems to fail as well. Does anybody have some idea of a way I could get this script working again? edit: seems like discord has the same window class name, so could be some issue with this? Still not sure of a way to solve the issue though, I added a function to get the handle of the active window and can just use that now, but it was able to find it on its own before on spotify startup or script startup which would be preferred. Thanks!
  8. hey, can anybody enlighten on lesser known Windows hacks or uses ?
  9. Hello all! I am having a bit of trouble and was wondering if anyone may have a workaround for my issue. I made a script that would automatically install a piece of software each night on a Windows 7 Box. Now I have been instructed to do the same with a Windows 10 box since the application is now being tested on Windows 10. The way I did the win7 installation was that I made a script and then made an executable that I call with a batch file along with the Installer. So the process is AutoitMainFile calls batch file, batch file opens Installer, and the automatedinstaller.exe The automatedinstlaller waits 10-20 seconds to make sure the Installer has been fully loaded. When I try to do the same both get loaded but the automatedinstallation.exe does not send commands to the installer. The code does work and nothing from the program we are wanting to install has changed as our Windows 7 runs every night no problem. Do I need to make a new automatedinstall script for windows 10? Any advice is appreciated Thanks, Richard
  10. Hello, I've been using autoit for about a year now and overall it's been great despite my limited understanding of all of its features. I have several scripts that run on virtual machines that have been running smoothly for several months without any issues. Recently, I had to create new virtual machines and migrate my scripts over and now I am getting errors that I can't seem to repeat, but seem to happen at least once a day with all of my executables that were flawless before. The error that I keep getting is: Autoit Error Line [this number varies per script] (File "[path to my executable]"); Error: variable must be of type object. I never received this error before until I moved everything to the new VMs, and when I rerun my scripts after clearing the error everything seems to work and run fine until hours later or sometimes the next day. I am assuming that that the root cause may be in some kind of settings on the VM itself since it is happening nearly across the board, but I have no idea where to even look. These are running on Windows 7, which is what they were running on before I had any errors. The only consistent include used in these scripts is IE.au3 Has anyone run into a similar problem or can maybe point me in the right direction. I am at the point of pulling hair out trying to resolve this. I have even rewritten and re-compiled the scripts to see if somehow the executables got corrupted, but that didn't help. Thank you.
  11. A few months ago I tried compiling scripts on Windows 7 x64 using NomadMemory. Everywhere I looked no one could figure out why _memoryRead() would only return 0s. The best advice that would be given is set debug privileges. At the time I just continued compiling my scripts on Vista x64 and accepted there wasn't a solution. However, a few months back I shared my code to a few people whom were using Windows 7 x64 and had to figure out why the scripts were not working. Here is what I found. Anything typecast as variable1 would immediately convert to 64 bit representation, however, if typecast instead as variable2 would not. variable1 = "0xVALUE" ;Bad, auto-converts to x64 representation variable2 = hex("VALUE") ;Good, stays as needed for x32 So i converted every instance of Variable = "0xVALUE" accordingly. The scripts still were not reading memory, but I was able to isolate the new problem, NomadMemory would return 64 bit representation for every int value. Floats, Bytes, character arrays, etc were working fine (inherently are the same length), but int, uint, etc were not. The workaround for this was replacing every _MemoryRead() with a function Func _NewMemRead($Addr1, $Proc1, $type1) If $type1 = "int" Then ;I only used int, if you use uint or any other integer representation, add them in here Return (Dec(Hex(StringRegExpReplace(_MemoryRead($Addr1, $Proc1, $type1), "00000000", "", 1)))) Else Return _MemoryRead($Addr1, $Proc1, $type1) EndIf EndFunc ;==>_NewMemRead Essentially the function would strip the extra 0s because of the conversion to x64, allowing the script to read memory. I am writing this up many months after the fact, At this time I cannot remember why I had to type cast the result to Hex and then Dec to get it to return the proper integer value. But it is probably the first problem mentioned above about the value being typecast to the wrong format. I hope this helps anyone out there who is looking for a solution to this problem.
  12. I have enabled admin sharing in the remote machine so that I can copy files to the remote machine use PSEXEC to execute our application remotely. Now, if the machine is poweredoff we need to poweriton. So I checked whether the remote machine, it is of both VirtualBox or VMWare one. For VirtualBox or VMware, I have found command line utities to poweron. But to autologon by skipping the login screen.Can anyone suggest how to do the same.If it is a physical machine, then there is no need to poweron but autologon is required. I am trying for windows machines.Win 7 at present. For VirtualBox I checked below link with help og guestadditions but not working. http://www.virtualbox.org/manual/ch09.html#autologon The below procedure will save the password in that machine and it will logon automatically. http://www.howtogeek.com/112919/how-to-make-your-windows-8-computer-logon-automatically/ But it will give access to everyne.But my opinion is he should access only if have credentias.I mean through any commandline from another machine he should trigger logon also by passing credentials. Similarly this also http://www.cnet.com/how-to/automatically-log-in-to-your-windows-10-pc/ http://superuser.com/questions/28647/how-do-i-enable-automatic-logon-in-windows-7-when-im-on-a-domain http://pcsupport.about.com/od/windows7/ht/auto-logon-windows-7.htm http://www.computerperformance.co.uk/windows7/windows7_auto_logon.htm https://technet.microsoft.com/en-us/magazine/ee872306.aspx Please guide me how to proceed.
  13. Loaded from latest releases of both AutoIt and SciTE and attempted to test by creating a simple SQLite script. When trying to run the script I get an 'Error Opening File' error on line 45 of AutoIt3Wrapper.au3 which consists of the following code: #include <WinAPIFiles.au3> Unable to find this file anywhere on my hard drive and unable to find any patch or similar error on the forum. Help? TIA ... Tom
  14. Hi guys, I have the latest Scite installed (SciTE4AutoIt3 3.6.2 - Feb 15 2016 18:42:26), running on Windows 7. I tried running Scite in parallel to AutoIT, with running manually in the command line "C:\Program Files (x86)\AutoIt3\SciTE\Koda\FD.exe" /Scite, It didn't work, and ever since, I can't activate Koda from the AutoIT Tools menu. I get the same error (only by trying to open Koda): %1 is not a valid Win32 application. Can someone please help me?
  15. Hi guys, I have the latest Scite installed (SciTE4AutoIt3 3.6.2 - Feb 15 2016 18:42:26), running on Windows 7. I tried running Scite in parallel to AutoIT, with running manually in the command line "C:\Program Files (x86)\AutoIt3\SciTE\Koda\FD.exe" /Scite, It didn't work, and ever since, I can't activate Koda from the AutoIT Tools menu. I get the same error (only by trying to open Koda): %1 is not a valid Win32 application. Can someone please help me?
  16. NOTE: MY STACK OVERFLOW QUESTION HERE ALSO: http://stackoverflow.com/questions/36162810/autoit-firefox-automation-ffclick-doesnt-work-on-buttons-anymore-ff-au3 Help! I had AutoIt code that would do the following: 1. load a page in FireFox, then 2. click on the 'browse' button, then 3. waits for the File Upload window to appear This code worked great and I used it many times! Now, about a month later, it stopped working. I checked the HTML page and it did NOT change, and the id is the same. Here are some resources: _FFOpenURL _FFLoadWait _FFClick WinWaitActive ControlClick Full list of FF.au3 functions Here is the HTML that I am trying to access. I am trying to click on #filename     <fieldset>         <legend>Import step one: upload Word Document</legend>         <h2>Import Word Document: Upload</h2>         <div class="field-group">              <div class="checkbox/radio">                   <label for="filename">Upload:</label>                   <input id="filename" name="filename" size="50" "="" type="file">              </div>          </div>          <input class="text hidden" name="pageId" value="158367782">           <div class="buttons-container">                <div class="buttons">                     <span class="word-file-loading hidden" id="loading">Loading</span>                     <input disabled="disabled" id="next" name="submit" value="Next" class="button" type="submit">                </div>           </div>     </fieldset> Here's my simplified AutoIt code that should press the #filename button:     ; 1) OPEN THE PAGE (WORKS) (I changed the URL)         _FFOpenURL("http://..../")     ; 2) WAIT FOR PAGE TO LOAD (WORKS)         _FFLoadWait()     ; 3) SLEEP FOR 5 SECONDS (WORKS)         Sleep(5000)     ; 4) CLICK THE BROWSE BUTTON (FAILS)     ;    (SAYS IT IS A SUCCESS BUT THE BUTTON NEVER GETS PRESSED!!)         _FFClick("filename", "id")     ; 5) WAIT FOR "FILE UPLOAD" WINDOW TO APPEAR (FAILS)     ;    (FAILS BECAUSE BUTTON NEVER GOT PRESSED ABOVE)         Local $result = WinWaitActive("File Upload","",10)  Here is my full autoit code that should press the #filename button:     ; 1) OPEN THE PAGE (WORKS)         If _FFOpenURL("http://..../") Then             FileWrite($log,"[INFO] Opened Page successfully." & @CRLF)         Else            FileWrite($log,"[ERROR] Could not open Page." & @error & " Extended Error Code = " & @extended  & @CRLF)            MsgBox(0, "Error", "Could not open Page.")            Exit         EndIf     ; 2) WAIT FOR PAGE TO LOAD (WORKS)         If _FFLoadWait() Then             FileWrite($log,"[INFO] Waited to open page successfully." & @CRLF)         Else             FileWrite($log,"[ERROR] Could not wait for Page." & @error & " Extended Error Code = " & @extended  & @CRLF)             MsgBox(0, "Error", "Could not wait for Page.")             Exit         EndIf     ; 3) SLEEP FOR 5 SECONDS          Sleep(5000)     ; 4) CLICK THE BROWSE BUTTON      ;    (SAYS IT IS A SUCCESS BUT THE BUTTON NEVER GETS PRESSED!!)         ;Click the "Choose File" button         If _FFClick("filename", "id") Then             FileWrite($log,"[INFO] Clicked the 'browse' button successfully." & @CRLF)         Else             FileWrite($log,"[ERROR] Could not click the 'browse' button." & @error & " Extended Error Code = " & @extended  & @CRLF)             MsgBox(0, "Error", "Could not click the 'browse' button.")             Exit         EndIf     ; 5) WAIT FOR "FILE UPLOAD" WINDOW TO APPEAR     ;    (FAILS BECAUSE BUTTON NEVER GOT PRESSED ABOVE)         ;Wait for the file upload dialog to appear         Local $result = WinWaitActive("File Upload","",10) ;Wait 10 seconds for "File Upload" window to appear         If $result == 0 Then            FileWrite($log,"[ERROR] Waited for 'File Upload' to show, but it never did. " & @error & " Extended Error Code = " & @extended  & @CRLF)            MsgBox(0, "Error", " Waited for 'File Upload' to show, but it never did. ")            Exit         Else            FileWrite($log,"[INFO] Opened 'File Upload' dialog successfully. " & @CRLF)         EndIf Here is the errors shown from the Scite console (I replaced the URL):     _FFOpenURL: http://...     __FFSend: try{window.content.top.document.location.href='http://...'}catch(e){'_FFCmd_Err';};     __FFRecv: http://...     _FFLoadWait: ....... loaded in 1688ms     [object HTMLDocument] - {pagetreesearchform: {...}, location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, ...}     __FFSend: FFau3.WCD=window.content.top.document;     __FFRecv: [object HTMLDocument] - {pagetreesearchform: {...}, location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, ...}     [object HTMLDocument] - {pagetreesearchform: {...}, location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, ...}     _FFLoadWait: . loaded in 83ms     [object HTMLDocument] - {pagetreesearchform: {...}, location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, ...}     __FFSend: try{FFau3.simulateEvent(FFau3.WCD.getElementById('filename'),'MouseEvents','click');}catch(e){'_FFCmd_Err';};     __FFRecv: 1     _FFLoadWait: . loaded in 11ms     [object HTMLDocument] - {pagetreesearchform: {...}, location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, ...}     +>11:56:43 AutoIt3.exe ended.rc:0     +>11:56:43 AutoIt3Wrapper Finished. And here is my version information: - AutoIt v3.3.14.2 - SciTE v3.6.0 - Firefox v44.0.2 - Firefox AutoIt Plugin - FF V0.6.0.1b-15.au3 (Docs) - Firefox Plugin for using AutoIt - [MozRepl][10] 1.1.2.1
  17. Cannot seem to find the answer to this anywhere. This is a special case software deployment so we are adding the compiled script to the Windows 7 startup folder and when its done running it calls a file to delete itself. Everything works great except BlockInput will not work when it runs as a windows login script. If I go in and manually run the script BlockInput works just fine but it simply will not take as a login script. We need to block users from opening any office applications for the 30-40 seconds the entire script runs or package will fail so any other ideas are welcomed. Here is the first part I have pulled for testing, the sleep parameter is just for testing purposes. #RequireAdmin #include <AutoItConstants.au3> #include <Date.au3> #include <MsgBoxConstants.au3> block() Func block() BlockInput(1) Sleep(5000) checknetwork() EndFunc ;==>block Func checknetwork() $var = Ping("server") If Not @error Then BlockInput(0) MsgBox(0,"avail", "SERVER IS AVAIL") ;verify_8() Else ;MsgBox for testing purposes only BlockInput(0) MsgBox(0, "Error!", "SERVER Is Not Accessible!", 10) Exit EndIf EndFunc ;==>checknetwork
  18. Hi, i have tried to use many scripts to change a pcs wallpaper but they dont work. This script sets the wallpaper but does not refresh it. Any idea what the problem is? #include <SendMessage.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <Misc.au3> #RequireAdmin $UrlDownload = "http://examplesite.org/test.bmp" ;DL link $Directory = "C:\test.bmp" ;Name of your file Local $download = InetGet($UrlDownload, $Directory,0,1) ; download in the background Do Sleep(100) Until InetGetInfo($download, 2) ;Checks to see if $download is completed (param 2) InetClose($download) RunWait($Directory) ;it will pause the script untill the process of the downloaded file is finished RegWrite ("HKEY_CURRENT_USER\Control Panel\Desktop", "wallpaper", "REG_SZ", "C:\test.bmp" ) Dim $hWnd = WinGetHandle('[CLASS:Progman]') _SendMessage($hWnd, $WM_COMMAND, 0x0001A220) Thanks Matthew
  19. Hello, I have created a script on my own computer for uninstalling and installing a specific customer application. For some reason it works great on my own computer, but i doesn't run at all at the customer his or her computer. I have a Windows 7 Professional - 64-bit machine and the first machine i have tested it at the customers location was a 32-bit machine, so ok, maybe that is the problem, but at an other computer with 64-bit it also doesn't work. So i installed AutoIT with editior on both machines, but a simple RUN command doesn't work. #RequireAdmin Run("C:\TEMP\Setup2010\setup.exe") With or without the RequireAdmin doesn't make a difference. Could someone help me to understand why my script works great on my own computer, but when you move it to another computer it doesn't work? If you compile it or not. Kind regards, Remco
  20. Hello, I am in a fix with this problem and I cant seem to find a viable solution. As you would know that the AutoIT scripts can go in pause mode for many reasons. It could be simply WinWait() that could take the script into that state. I do understand that a better design could help a lot but I would like to handle such situation with existing my code. To simplify my query - I am looking for a way to calculate how long the given script/compiled script has been in "pause" state. Is there a way to do that? For example, if my script has been in pause state for 3 hours I would like to kill or restart the pc . I do understand that Auto IT is not multi-threaded but is there a way to achieve what I am trying to? Any help or suggestion is much appreciated. Thanks
  21. I am trying to read an ASPX page and I'm using IE.au3. I'm not getting!!! Does anyone know how I can solve this problem ?! Is there any UDF that solves this ?!
  22. I am trying to automate a software installation using Autoit in Windows 7. I am facing issue in following scenario. I want to wait 30 seconds to a window to be appear. If window not appears within 30 seconds, my script should go to next action. Tried using WinWaitActive, But it always waiting for a window. if window not appears, its throws "AutoItError: timeout on wait for activate window". Now I dont want to get this error. My script should go to next action. Can anyone guide me on this please?
  23. I made a general utility file for volume and playback control, using the _W7sound UDF for muting spotify and only spotify, but when trying to automate it, so whenever the title has or contains "Spotify" spotify should be muted. Otherwise, it should unmute spotify. If i initiate muting spotify with a hotkey, it works, and will unmute properly, but I want it to mute automatically as well. I've tried many different ways to do this, most recently this. while 1 Sleep(300) ; give time for title of window to change $title = WinGetTitle("[CLASS:SpotifyMainWindow]") ; check what title is If (StringInStr($title, "Spotify")) Then ; if not song title, mute. If Not $autoUnmute Then autoMute() EndIf EndIf If $autoUnmute Then ;var set by "autoMute", if true, check when to unmute. ToolTip("Muted", 0, 0) While (StringInStr($title, "Spotify")) Sleep(200) $title = WinGetTitle("[CLASS:SpotifyMainWindow]") WEnd ToolTip("") Sleep(300) If $autoUnmute Then _SetVolume("[CLASS:SpotifyMainWindow]", _GetVolume("[CLASS:SpotifyMainWindow]")) EndIf $autoUnmute = False EndIf Sleep(200) WEnd Func autoMute() $title = WinGetTitle("[CLASS:SpotifyMainWindow]") ; double check still muted If (StringInStr($title, "Spotify")) Then ; if it is, mute, set var to true so while loop checks when to unmute. _MuteVolume("[CLASS:SpotifyMainWindow]") $autoUnmute = True EndIf EndFuncif i remove the part above "If $autoUnmute Then" and just call autoMute myself with the hotkey I set, it works and properly mutes, then unmutes. Trying like this seems to have trouble though. Anyone have some idea why I would be having trouble? I did notice a slight delay in the time of me pausing Spotify and the actual title changing in "SndVol.exe" (volume mixer), but haven't been able to figure out how to fix this if that was the issue.
  24. I have a script that starts up all my work programs. Programs like ventrilo, trillian, and other work stuff. In the past week, I noticed two of these programs not starting up while 6 of them work the same. I investigated and I notice these only start when I run the script as administrator (or add #requireadmin). I use windows 7 and have no UAC. I have not changed anything to my OS except install updates. I'm so confused why only some of these programs now start up and require admin. If I double click the executable or run in command prompt, they startup fine. Does anyone have a clue what happened to cause this change and if I can change it back? Below is the code I ran as a test. Only the last program now starts up unless I add #requireadmin or right click and run the script as admin. Thanks for any help. #include <Misc.au3> RUN("C:\Program Files\Ventrilo\Ventrilo.exe") Sleep(1000) RUN("C:\Program Files (x86)\Trillian\trillian.exe") RUN("C:\Program Files (x86)\Stealth Alerts\SAClient.exe") ; This works just fine
  25. Hi All, I had this issue a while ago but cant seem to fix it this time, and the old hard drive died so cant get the registry from it. Ive done a fully install of the latest version of autoit on my win7 machine, but I cant 'Compile With Options' when right clicking a .au3 file. At the moment my registry entry for compile with option is: "C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe.exe" /in "%l" But this only compiles, it doesnt include the options declared at the start of my .au3 script which are: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=Ap2.ico #AutoIt3Wrapper_Outfile=Project.exe #AutoIt3Wrapper_Res_Comment=Project #AutoIt3Wrapper_Res_Description=Project #AutoIt3Wrapper_Res_Fileversion=1.0.2.1 #AutoIt3Wrapper_Res_LegalCopyright=By Jeffrey #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Can someone help?
×
×
  • Create New...