meatsack Posted January 16, 2010 Share Posted January 16, 2010 (edited) Before I asked my questions I reviewed the FAQ posted in this forum, checked the wiki, listened to some 403forbidden403 tutorials, and checked the online documentation. It seems somewhat complex to get sendkeys just to open 2 files on my desktop. When I run the script below it opens a Microsoft application and its corresponding file but fails to open firefox. Thanks for any help. My tactic was to use keyboard short cuts with the "scriptwriter" to create my script using the sendkey type of function. I copied this data from Scite: Send("{TAB}{TAB}{TAB}{TAB}") WinWait("Program Manager","") If Not WinActive("Program Manager","") Then WinActivate("Program Manager","") WinWaitActive("Program Manager","") Send("2{ENTER}") WinWait("Todo Main - Microsoft Office OneNote","") If Not WinActive("Todo Main - Microsoft Office OneNote","") Then WinActivate("Todo Main - Microsoft Office OneNote","") WinWaitActive("Todo Main - Microsoft Office OneNote","") Send("{LWINDOWN}d{LWINUP}") WinWait("classname=WorkerW","") If Not WinActive("classname=WorkerW","") Then WinActivate("classname=WorkerW","") WinWaitActive("classname=WorkerW","") Send("{LWINDOWN}{LWINUP}") WinWait("classname=Shell_TrayWnd","") If Not WinActive("classname=Shell_TrayWnd","") Then WinActivate("classname=Shell_TrayWnd","") WinWaitActive("classname=Shell_TrayWnd","") Send("{ESC}{SHIFTDOWN}{TAB}{SHIFTUP}") WinWait("classname=WorkerW","") If Not WinActive("classname=WorkerW","") Then WinActivate("classname=WorkerW","") WinWaitActive("classname=WorkerW","") Send("3{ENTER}") WinWait("Keyboard shortcuts - Mozilla Firefox","") If Not WinActive("Keyboard shortcuts - Mozilla Firefox","") Then WinActivate("Keyboard shortcuts - Mozilla Firefox","") WinWaitActive("Keyboard shortcuts - Mozilla Firefox","") Send("") Just FYI this sticky Topic: Locked Topic STICKY Icon FAQ (Frequently Asked Questions) Read me first! Jon Icon * 0 Replies * 34,469 Views * Icon Mar 27 2006 11:07 PM * By: Jon Icon Has a bad link: Not Found The requested document was not found on this server. If you came from an external site the links may be out of date. Other things to try: * Go to www.autoitscript.com/autoit3/docs * Search www.autoitscript.com: Web Server at autoitscript.com ALSO their is a bad link on the home page when you click "online documentation" : Not Found The requested document was not found on this server. If you came from an external site the links may be out of date. Other things to try: * Go to www.autoitscript.com/autoit3 * Search www.autoitscript.com: Web Server at autoitscript.com THIS is not satisfactory either as it doesn't open the specific file even though it does open both applications. run('C:\Program Files\Mozilla Firefox\firefox.exe') run('C:\Program Files\Microsoft Office\Office12\onenote.exe') Edited January 17, 2010 by meatsack Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 17, 2010 Share Posted January 17, 2010 Nothing of that makes any sense. Anyway: Run(@SystemDir & '\mspaint.exe "' & @DesktopDir & '\Photo_031509_001.jpg"') ShellExecute(@DesktopDir & '\blabla.txt') .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
meatsack Posted January 17, 2010 Author Share Posted January 17, 2010 Nothing of that makes any sense. Anyway: Run(@SystemDir & '\mspaint.exe "' & @DesktopDir & '\Photo_031509_001.jpg"') ShellExecute(@DesktopDir & '\blabla.txt') Thanks, that worked well for me. I appreciate you helping out a new person where not many were interested in responding. I owe you one. As far as how I did it. I did what I was told. I used the scriptwriter or "AU3Record 3.1" trying to record the script and all the other gobblde gook came out. It there any good tutorials on using the recorder? Well this works for now: run('C:\Program Files\Mozilla Firefox\firefox.exe') Run(@SystemDir & '\onenote.exe "' & @DesktopDir & '\2todo.one"') ShellExecute(@DesktopDir & '\2todo.one') Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 18, 2010 Share Posted January 18, 2010 (edited) You're still not making any sense. The recorder doesn't need any tutorial. It records what you do, nothing more, nothing less. And why are you running "2todo.one" 2 times? Edited January 18, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
crashdemons Posted January 18, 2010 Share Posted January 18, 2010 (edited) EDIT: Nevermind, refer to the next post. Has a bad link: Not Found The requested document was not found on this server. If you came from an external site the links may be out of date. Other things to try: * Go to www.autoitscript.com/autoit3/docs It may just be how the post is formatted, but the links you posted which are "bad", www.autoitscript.com/autoit3/docs www.autoitscript.com/autoit3 , have an invisible character (0xAD) after each period and slash.... If I remove the character, the links work fine. www.autoitscript.com/autoit3/docs www.autoitscript.com/autoit3 The original pages and posts do not seem to have this issue... so it may be something interfering on your end. Note: you can see the character if you copy his text into notepad and change the font to Terminal... ALSO their is a bad link on the home page when you click "online documentation" You mean clicking on this link? Online Documentation From this page? AutoIt v3 Works for me fine. Edited January 18, 2010 by crashdemons My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.) Link to comment Share on other sites More sharing options...
JohnOne Posted January 18, 2010 Share Posted January 18, 2010 There was a problem with online docs yesterday. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
crashdemons Posted January 18, 2010 Share Posted January 18, 2010 There was a problem with online docs yesterday.Thanks for the note, I was not aware any issue had occured.I have edited my post to refer to your post. My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now