Guy_ Posted November 3, 2006 Share Posted November 3, 2006 (edited) [fully working now]I've been sitting on this for quite a while, because I couldn't find how to start the script from inside Photoshop, but that's cured now.Save in a .jsx file and put in PS scripts folder, e.g.:var upload = new File("/c/upload/AutoIt_upload.exe"); upload.execute();An action in Photoshop also saves the picture to c:\upload\picture.jpg and then calls the PS script that calls the AutoIt script.This AI script is kinda working a lot of the time, but is critical on some timings and how the pages are made up. Hopefully they'll remain the same for a while.The problem is that while uploading I now often get these popups (didn't used to, so you might not) which I'd like to kill automatically. They can reoccur more than once while the upload is going on, so ideally, I'd need a way to 'ok' (enter) all of them (either "stop" or "continue" works).I don't even know what software is generating them...SOLUTION (also added in main script) [update]:While Not WinExists("Hosting -") ; Try to close dialog if popping up (trial) If WinExists("Warning:") Then Send("{ENTER}") EndIf WEndThe .bat files look like this:FF_openUrl_ImageShack.bat"c:\Program Files\Mozilla Firefox\firefox.exe" "http://imageshack.us/index4.php"FF_newTab_openUrl_ImageShack.bat"c:\Program Files\Mozilla Firefox\firefox.exe" -new-tab "http://imageshack.us/index4.php" Edited November 4, 2006 by Guy_ Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted November 3, 2006 Moderators Share Posted November 3, 2006 I made an ImageShack Uploader here a while back. Try replacing the section of your code that uploads to ImageShack with my code and see if it clears up the problem. Link to comment Share on other sites More sharing options...
Guy_ Posted November 3, 2006 Author Share Posted November 3, 2006 (edited) Looks like a great little piece of code I might use for the IE variation, but personally I only use Firefox and IE won't even connect on my current partition... I also have a feeling that these popups could be some personal problem caused by some Firefox things that are clashing. So the uploading code is not the biggest problem, but the solution to closing these popups. Should be easy for someone less newbie than me, though. Anyway, great to learn of your script! Thanks Edited November 3, 2006 by Guy_ Link to comment Share on other sites More sharing options...
Guy_ Posted November 3, 2006 Author Share Posted November 3, 2006 BTW: I realise that when a popup comes up, the scripts continues from WEnd, but when I placed the closing code after WEnd, the popup didn't go away either... And it should be in some sort of loop, because they can come repeatedly. While Not WinExists("Warning: Unresponsive script") ; if no popups... WinWait("Hosting -") ; wait for final web page with all picture urls If WinActive("Warning:") Then ; if popup Send("{ENTER}") ; close it EndIf WEnd Link to comment Share on other sites More sharing options...
Guy_ Posted November 4, 2006 Author Share Posted November 4, 2006 (edited) OK, I looked at it again and found the solution: While Not WinExists("Hosting -") If WinExists("Warning:") Then Send("{ENTER}") ; close dialog if popping up EndIf WEnd I've added it in the main script, so it should be working most of the time Edited November 4, 2006 by Guy_ 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