
simonwar
Active Members-
Posts
22 -
Joined
-
Last visited
Everything posted by simonwar
-
Tried it but its still not having any of it. Printing as a PDF is causing a problem I can't get around, sticky? Any more ideas appreciated?
-
OK, done the mods, nice one. I think whats happening is this line is not always going to be the same: _WinWaitActivate("esafetysigns.co.uk Order FB26DG10000520.pdf - Adobe Acrobat Pro", "") as different files to SAVE AS could be esafetysigns.co.uk Order AB15CD10000521.pdf and so on 522, 523, etc How do I close Adobe Acrobat Pro irresective of the file thats open in it? I tried _WinWaitActivate("Adobe Acrobat Pro", "") Send("{CTRLDOWN}q") but, didn't work? Thanks, Simon.
-
Hi, I have a script that initiates a "Print to Adobe, Acrobat", but when it does it pauses my script and does not complete the script routine? This is my code $i = 0 $repeats = InputBox("Repeats", "How many loops?", "") While ($i < $repeats) _WinWaitActivate("Catalog - Orders", "") MouseClick("left", 301, 13, 1) MouseClick("left", 70, 136, 1) MouseClick("right", 70, 136, 1) Sleep(500) Send("{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}") _WinWaitActivate("Mail", "") Sleep(500) Send("{TAB}{TAB}{HOME}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{SHIFTDOWN}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{SHIFTUP}{CTRLDOWN}c{CTRLUP}{ESC}") _WinWaitActivate("Catalog - Orders", "") Send("{ALTDOWN}ts{ALTUP}") _WinWaitActivate("Select Print Destination", "") Sleep(100) Send("{ALTDOWN}p{ALTUP}") _WinWaitActivate("Save PDF File As", "") Sleep(100) Send("{CTRLDOWN}v{CTRLUP}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{BACKSPACE}{BACKSPACE}{ENTER}") _WinWaitActivate("esafetysigns.co.uk Order FB26DG10000520.pdf - Adobe Acrobat Pro", "") Sleep(9000) Send("{CTRLDOWN}q") $i = ($i + 1) WEnd I am using SLEEP to slow AutoIt down to allow the program its working with to "catch up", however the final SLEEP, Sleep(9000), doesn't finish? The rest of the scipt is simply mouse moves around a screen to grab, COPY and PASTE, the relevant filenames required to SAVE AS. The SAVE AS works fine, Acrobat opens, but I cannot close Acrobat using Send("{CTRLDOWN}q"), and when I check the Script status in the task bar, it indicates Script Paused? Any ideas? Thanks, Simon. P.S. I have tried many different length SLEEPS at the end and none of them work.
-
Hi, I have a program open that i wish to perform some repeated tasks on. At the moment as I am a newbie, I am clicking on it using a mouse command to make it the active program, but if the window is in a different place the mouse misses the spot. MouseClick("left",265,14,1) where the position 265,14,1 is simply a spot on the header bar of my program. Is there a way of saying something like Activte this program "...." Note I see a line before the Mouseclick code _WinWaitActivate("Catalog - Orders","") and the program is called "Catalog" and I am in the "Orders" tab ... Q. Is there a more absolute method than mouse clicking to activate a program? Thanks, Simon.
-
Got it thanks.
-
Hi, I recently upgraded to AutoIt3 and could not find the function I used to use all of the time - "Recording", i.e. I would start a new au3 file, click EDIT and begin macro programming and a RECORD button would come up on the screen and then click it and perform the task to be AUTOIT's and the code would be writen for me into the au3 file exactly as I undertook them? I can't find this function any more? Has it gone or been replaced? Thanks, Simon.
-
How do you stop a looping script that has the mouse running about to. Sreamed at my PC hitting everything damn thing, Esc Ctrl-Esc Ctrl-Alt-Esc Aaaaaarrggghhhhh! How do I simply put in an exit command, for example if I hit Esc regardless it will pause the script. Thanks, Simon.
-
While.... Wend loop for a given number of times ...
simonwar replied to simonwar's topic in AutoIt General Help and Support
I get it, its just i didn't know how to resolve it? However, I tried to resolve and followed the syntax assistant to the letter, and ended up with it working, but whatever number i I entered, I always got a "3" displayed, but the loop worked the correct number of times. Resorted to your simpler method ..... works spot on. Thanks, Simon. -
While.... Wend loop for a given number of times ...
simonwar replied to simonwar's topic in AutoIt General Help and Support
I get an error with the syntax $repeats=InputBox("Repeats", "How many Loops?", "", 300,100,300,300) saying "Error:Incorrect number of parameters in function call" Any ideas, thanks, Simon ? -
Selecting from a drop down list ....
simonwar replied to simonwar's topic in AutoIt General Help and Support
Nice one! The pause using Sleep works a treat. What I actually had to do was use Sleep twice as follows Send("{CTRLDOWN}v{CTRLUP}-") Sleep (2000) MouseMove(314,11) MouseDown("left") MouseUp("left") Sleep (1000) It seems XP Windows has take think a second to realise the file in the pop-up window..... give it a second though and it finds the file no probs!. Thanks, Simon. -
Selecting from a drop down list ....
simonwar replied to simonwar's topic in AutoIt General Help and Support
No I don't know the PATH or full FILENAME. I set the software up so that OPEN is at the right PATH, and the FILENAME is established by entering into the 'select file form window' in the OPEN window part of the FILENAME enought to see it appear in a pull-down box - default to XP. The code follows: Its created using the macro recorder. My PC is set up ready with the application 'Catalog- eSafety Signs', open at the right place. The full code is below but if you look at: If Not WinActive("Select...","") Then WinActivate("Select...","") WinWaitActive("Select...","") Send("{CTRLDOWN}v{CTRLUP}-") MouseMove(314,11) MouseDown("left") This is where the scipt fails to select an item in a pull-down box, after I 'Ctrl-V' PASTE and using a hyphen '-' input enough letters of the filename required for it to appear as the only option in the pull-down. Its the Mouse Down("left") that fails to work, there's seems to be a slight delay before the pull-down appears and the mouse has already moved and clicked down before its had a chance to realise itself. A way of waiting until pull-down results had finished would work... perhaps ? See what you think, code below. Thanks, Simon. CODE#region --- ScriptWriter generated code Start --- Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("Catalog - eSafety Signs","") If Not WinActive("Catalog - eSafety Signs","") Then WinActivate("Catalog - eSafety Signs","") WinWaitActive("Catalog - eSafety Signs","") MouseMove(953,144) MouseDown("left") MouseUp("left") MouseMove(920,246) MouseDown("left") MouseUp("left") Send("{HOME}{SHIFTDOWN}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{SHIFTUP}{CTRLDOWN}c{CTRLUP}") MouseMove(349,155) MouseDown("left") MouseUp("left") Send("{DOWN}") MouseMove(1060,187) MouseDown("left") MouseUp("left") MouseMove(815,221) MouseDown("left") MouseUp("left") MouseMove(1170,222) MouseDown("left") MouseUp("left") WinWait("Select...","") If Not WinActive("Select...","") Then WinActivate("Select...","") WinWaitActive("Select...","") Send("{CTRLDOWN}v{CTRLUP}-") MouseMove(314,11) MouseDown("left") MouseUp("left") Send("{BACKSPACE}-") MouseMove(311,383) MouseDown("left") MouseUp("left") Send("{ENTER}") WinWait("Catalog - eSafety Signs","") If Not WinActive("Catalog - eSafety Signs","") Then WinActivate("Catalog - eSafety Signs","") WinWaitActive("Catalog - eSafety Signs","") MouseMove(680,243) MouseDown("left") MouseUp("left") MouseMove(322,148) MouseDown("left") MouseUp("left") Send("{DOWN}") MouseMove(982,150) MouseDown("left") MouseUp("left") MouseMove(924,216) MouseDown("left") MouseUp("left") MouseMove(1180,227) MouseDown("left") MouseUp("left") WinWait("Select...","") If Not WinActive("Select...","") Then WinActivate("Select...","") WinWaitActive("Select...","") Send("{CTRLDOWN}v{CTRLUP}{SHIFTDOWN}l{SHIFTUP}2x1") MouseMove(292,386) MouseDown("left") MouseUp("left") Send("{ENTER}") WinWait("Catalog - eSafety Signs","") If Not WinActive("Catalog - eSafety Signs","") Then WinActivate("Catalog - eSafety Signs","") WinWaitActive("Catalog - eSafety Signs","") MouseMove(675,241) MouseDown("left") MouseUp("left") MouseMove(803,696) MouseDown("left") MouseUp("left") MouseMove(266,147) MouseDown("left") MouseUp("left") #endregion --- ScriptWriter generated code End --- -
Hi, I am trying to open a file by entering part of its name into its Open box and then attempting to record using the MacroRecorder the action of selecting the entry in the pull-down. I am ok with getting only one file in the pull-down to chose from, but I keep getting an error, as i cannot seem to get the file in the pull-down to select, with mouse or a keystroke and appear in the open-file entry box and therefore open on enter? Any ideas ?
-
Stopping a 'Running' script ...
simonwar replied to simonwar's topic in AutoIt General Help and Support
Can you elaborate... what is tray, couldn't do anything with anything apart from shutdown. Again, forgive my lack of experience, not sure how to do this ? Thanks, Simon. P.S. I am using While 1 --------- WEnd as the loop code -
Apologies for this seemingly easy question.... .....but I just got into hell of a mess with a Do....While loop, nearly lost lots of work basically because i couldn't stop the script. Hit every key on the board, Esc, Ctrl-Esc, Ctrl-Alt-Del, Alt-F4, you name it..... but nothing.... the scipt, tireless to the end, continued.
-
Live Learning and teaching AutoIt .....
simonwar replied to simonwar's topic in AutoIt General Help and Support
Wow.... perfect. I am very impressed with this thanks for all the help. Simon. -
Live Learning and teaching AutoIt .....
simonwar replied to simonwar's topic in AutoIt General Help and Support
I have gone down this road, keystrokes and it all works great. However how can I loop all of the code I have. A continuous loop will be OK. What I am doing now is clicking "Run Script", everytime I do a run, the clicking it again then again then again.....etc. Is there a simple way of saying go back to the start and do it all again. Thanks, Simon. Here is the code I am using. #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("Microsoft Excel - poduct passwords AutoScript","") If Not WinActive("Microsoft Excel - poduct passwords AutoScript","") Then WinActivate("Microsoft Excel - poduct passwords AutoScript","") WinWaitActive("Microsoft Excel - poduct passwords AutoScript","") MouseMove(317,18) MouseDown("left") MouseUp("left") Send("{CTRLDOWN}c{CTRLUP}") WinWait("Adobe Acrobat Professional","") If Not WinActive("Adobe Acrobat Professional","") Then WinActivate("Adobe Acrobat Professional","") WinWaitActive("Adobe Acrobat Professional","") MouseMove(288,12) MouseDown("left") MouseUp("left") Send("{CTRLDOWN}o{CTRLUP}") WinWait("Open","") If Not WinActive("Open","") Then WinActivate("Open","") WinWaitActive("Open","") Send("{CTRLDOWN}v{CTRLUP}{ENTER}") WinWait("Microsoft Excel - poduct passwords AutoScript","") If Not WinActive("Microsoft Excel - poduct passwords AutoScript","") Then WinActivate("Microsoft Excel - poduct passwords AutoScript","") WinWaitActive("Microsoft Excel - poduct passwords AutoScript","") MouseMove(447,19) MouseDown("left") MouseUp("left") Send("{ESC}{RIGHT}{CTRLDOWN}c{CTRLUP}") WinWait("Adobe Acrobat Professional","") If Not WinActive("Adobe Acrobat Professional","") Then WinActivate("Adobe Acrobat Professional","") WinWaitActive("Adobe Acrobat Professional","") MouseMove(250,15) MouseDown("left") MouseUp("left") MouseMove(204,95) MouseDown("left") MouseUp("left") MouseMove(204,118) MouseDown("left") MouseUp("left") WinWait("Password Security - Settings","") If Not WinActive("Password Security - Settings","") Then WinActivate("Password Security - Settings","") WinWaitActive("Password Security - Settings","") MouseMove(38,105) MouseDown("left") MouseUp("left") Send("{CTRLDOWN}v{CTRLUP}{ENTER}") WinWait("Adobe Acrobat - Confirm Open Document Password","") If Not WinActive("Adobe Acrobat - Confirm Open Document Password","") Then WinActivate("Adobe Acrobat - Confirm Open Document Password","") WinWaitActive("Adobe Acrobat - Confirm Open Document Password","") Send("{CTRLDOWN}v{CTRLUP}{ENTER}") WinWait("Microsoft Excel - poduct passwords AutoScript","") If Not WinActive("Microsoft Excel - poduct passwords AutoScript","") Then WinActivate("Microsoft Excel - poduct passwords AutoScript","") WinWaitActive("Microsoft Excel - poduct passwords AutoScript","") MouseMove(328,13) MouseDown("left") MouseUp("left") Send("{ESC}{RIGHT}{CTRLDOWN}c{CTRLUP}") WinWait("Adobe Acrobat Professional","") If Not WinActive("Adobe Acrobat Professional","") Then WinActivate("Adobe Acrobat Professional","") WinWaitActive("Adobe Acrobat Professional","") MouseMove(257,8) MouseDown("left") MouseUp("left") MouseMove(203,96) MouseDown("left") MouseUp("left") MouseMove(209,123) MouseDown("left") MouseUp("left") WinWait("Password Security - Settings","") If Not WinActive("Password Security - Settings","") Then WinActivate("Password Security - Settings","") WinWaitActive("Password Security - Settings","") MouseMove(55,214) MouseDown("left") MouseUp("left") Send("{CTRLDOWN}v{CTRLUP}") MouseMove(509,271) MouseDown("left") MouseUp("left") MouseMove(365,322) MouseDown("left") MouseUp("left") MouseMove(73,360) MouseDown("left") MouseUp("left") Send("{ENTER}") WinWait("Adobe Acrobat - Confirm Permissions Password","") If Not WinActive("Adobe Acrobat - Confirm Permissions Password","") Then WinActivate("Adobe Acrobat - Confirm Permissions Password","") WinWaitActive("Adobe Acrobat - Confirm Permissions Password","") Send("{CTRLDOWN}v{CTRLUP}{ENTER}") WinWait("Adobe Acrobat Professional","") If Not WinActive("Adobe Acrobat Professional","") Then WinActivate("Adobe Acrobat Professional","") WinWaitActive("Adobe Acrobat Professional","") MouseMove(23,42) MouseDown("left") MouseUp("left") MouseMove(73,159) MouseDown("left") MouseUp("left") WinWait("Adobe Acrobat","") If Not WinActive("Adobe Acrobat","") Then WinActivate("Adobe Acrobat","") WinWaitActive("Adobe Acrobat","") MouseMove(250,153) MouseDown("left") MouseUp("left") WinWait("Microsoft Excel - poduct passwords AutoScript","") If Not WinActive("Microsoft Excel - poduct passwords AutoScript","") Then WinActivate("Microsoft Excel - poduct passwords AutoScript","") WinWaitActive("Microsoft Excel - poduct passwords AutoScript","") MouseMove(340,11) MouseDown("left") MouseUp("left") Send("{ESC}{LEFT}{LEFT}{DOWN}") #endregion --- ScriptWriter generated code End --- #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.4.9 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here -
Live Learning and teaching AutoIt .....
simonwar replied to simonwar's topic in AutoIt General Help and Support
Thanks all. I am playing with the record function and its looking good, however can you help me clarify a few points and maybe recommend a better way. I notice, if I understand it correctly, that if I record and use my mouse to initiate actions, any movement of screen positions between Re-runs need to have everything in exactly the same position, else the mouse moves to a point and clicks in space? Is this true and therefore are keyboard strokes a tighter method when recording. What do you think, Simon? -
Live Learning and teaching AutoIt .....
simonwar replied to simonwar's topic in AutoIt General Help and Support
I opened SciTE4AutoIt3 Version 1.71 I clicked on Tools and could not see any options like 'Recorder' etc? Where is it? Alos, how do you establish the executable of an application, I have Adobe Pro 6 and trying to find the *.exe of it ? Thanks, Simon. -
Hi, I am new to Auto It, but can see its benefits. As I am not a scripter in any way whatsoever, is it posible to teach AutoIt by actually carrying out the tasks you want to repeat while its in a Record mode ? A bit like recording macro's in Excel. Thanks, Simon.
-
Allocating passwords to Acrobat files from Excel ...
simonwar replied to simonwar's topic in AutoIt General Help and Support
Can't really get the time to do this, its not my bag.... I'm a graphic artist. Is there any freelance persons who may help me for a fee? Apologies for scouting for business on a forum, but i can't seem to get off the ground on this one and really need the help. Thanks, Simon. -
Hi, I am COMPLETELY new to AutoIt and would like to know if the following procedure could be automated even in stages: Basically, I want to allocate BOTH of the passwords used to protect PDF files in Adobe Pro 6.... these are called OPEN and PERMISSIONS, and both need to be input and confirmed before file saving. The passwords come from a spreadsheet. I have 1000 PDF files..... so you can see I am keen to simplify. The manual procedure goes like this..... 1. Open Acrobat Pro 6, (do I assume this is done manually, as it is only required once)? 1a. Open all files to be actioned.....adobe has a file open limit of approx 30..... but thats OK. 2. Open Excel 2a. Open Spreasdsheet that contains passwords. 3. Select the Adobe file in question. Click Security > Restrict Opening and Editing 4. Select tickbox 'Require a password' 4a. Goto spreadsheet at the correct entry and COPY password return to Acrobat and PASTE into password box. 4b. Select tickbox 'Use a permissions password" 4c. Goto spreadsheet at the correct entry and COPY password return to Acrobat and PASTE into password box. 4d. Select "Printing Allowed" pull down box. 4e. Click OK. 4f. Re-Enter OPEN password when prompted > Click OK. 4g. Re-Enter PERMISSIONS password when prompted > Click OK. 4h. Save and Close Acrobat file. 5. Next File..... Hope that makes sense. Appreciate and help or guidance, Simon.