mcnmihail Posted January 13, 2009 Share Posted January 13, 2009 I have 200 photos, named DSC09100.JPG until DSC09300.JPG I have a program that edit photos and put a chosen Frame (FrameMaster) To put frames on 200 photos it will take me 2hours manual So, I need to open each photo, add a certain frame from the program, and save the photo(replace the original) with the autoit. I make the steps to open a photo, add the frame and then save, but I don`t know how to restart the process and select the next photo from the folder and make the same operations. Until now I try this: Run("C:\Program Files\FrameMaster2\FrmMstr.exe") WinWaitActive("Information") send("{ENTER}") WinWaitActive("FrameMaster") send('{alt}') send("{ENTER}") send("{ENTER}") WinWaitActive("Open") send('{tab},{tab},{tab},{tab},{tab},{tab},{tab}') send('{down}') send("{ENTER}") WinWaitActive("==UNREGISTERED== FrameMaster") send('{alt}') send("{RIGHT}") send("{RIGHT}") send("{DOWN}") send("{DOWN}") send("{ENTER}") send('{p}') send('{a}') send('{alt}') send("{DOWN}") send("{DOWN}") send("{DOWN}") send("{DOWN}") send("{ENTER}") send('{tab},{tab}') send("{ENTER}") send("{ENTER}") ;==================================================== can some one help me? with respect, mike Link to comment Share on other sites More sharing options...
FireFox Posted January 13, 2009 Share Posted January 13, 2009 (edited) @mcnmihail For 4 tab keys to send use : Send("{TAB 4}") Then you can check for MouseClick ; ControlClick ; etc... Cheers, FireFox. Edited January 13, 2009 by FireFox Link to comment Share on other sites More sharing options...
cramaboule Posted January 13, 2009 Share Posted January 13, 2009 I have 200 photos, named DSC09100.JPG until DSC09300.JPG I have a program that edit photos and put a chosen Frame (FrameMaster) To put frames on 200 photos it will take me 2hours manual So, I need to open each photo, add a certain frame from the program, and save the photo(replace the original) with the autoit. I make the steps to open a photo, add the frame and then save, but I don`t know how to restart the process and select the next photo from the folder and make the same operations. Until now I try this: Run("C:\Program Files\FrameMaster2\FrmMstr.exe") WinWaitActive("Information") send("{ENTER}") WinWaitActive("FrameMaster") send('{alt}') send("{ENTER}") send("{ENTER}") WinWaitActive("Open") send('{tab},{tab},{tab},{tab},{tab},{tab},{tab}') send('{down}') send("{ENTER}") WinWaitActive("==UNREGISTERED== FrameMaster") send('{alt}') send("{RIGHT}") send("{RIGHT}") send("{DOWN}") send("{DOWN}") send("{ENTER}") send('{p}') send('{a}') send('{alt}') send("{DOWN}") send("{DOWN}") send("{DOWN}") send("{DOWN}") send("{ENTER}") send('{tab},{tab}') send("{ENTER}") send("{ENTER}") ;==================================================== can some one help me? with respect, mike Hi ! use While 1 . . . . . . Wend see the HELP file for more info (F1) Cramaboule My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
mcnmihail Posted January 13, 2009 Author Share Posted January 13, 2009 @mcnmihailFor 4 tab keys to send use : Send("{TAB 4}")Then you can check for MouseClick ; ControlClick ; etc...Cheers, FireFox.Tnx! will do Link to comment Share on other sites More sharing options...
mcnmihail Posted January 13, 2009 Author Share Posted January 13, 2009 Hi ! use While 1 . . . . . . Wend see the HELP file for more info (F1) Cramaboule When the window to select the file is open I will send the file name something like this? send('{DSC0$i.jpg}') ? and then enter to open it. WinWaitActive("Open") send({DSC0$i.jpg}') $i = 9100 While $i <= 9300 MsgBox(0, "Value of $i is:", $i) $i = $i + 1 WEnd send("{ENTER}") Link to comment Share on other sites More sharing options...
cramaboule Posted January 13, 2009 Share Posted January 13, 2009 When the window to select the file is open I will send the file name something like this? send('{DSC0$i.jpg}') ? and then enter to open it. WinWaitActive("Open") send({DSC0$i.jpg}') $i = 9100 While $i <= 9300 MsgBox(0, "Value of $i is:", $i) $i = $i + 1 WEnd send("{ENTER}") Hi, so,... make a <for next> For $i = 1 to 200 <here code to open your window> WinWaitActive("Open") Send("DSC0") & $i & Send(".jpg") . . . . <span class="postcolor">;====================================================</span> Next Cram My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
FireFox Posted January 13, 2009 Share Posted January 13, 2009 @mcnmihail Send("DSC0" & $i & ".jpg") $i = 9100 While $i <= 9300 MsgBox(0, "Value of $i is:", $i) $i = $i + 1 WEnd send("{ENTER}") you can add path before picture (Send("C:\....")) Cheers, FireFox. Link to comment Share on other sites More sharing options...
cramaboule Posted January 13, 2009 Share Posted January 13, 2009 Send("DSC0" & $i & ".jpg") Arrr! of course !.... I understand now why all my script are not working !!!!! :-) My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
mcnmihail Posted January 13, 2009 Author Share Posted January 13, 2009 Hi, so,... make a <for next> For $i = 1 to 200 <here code to open your window> WinWaitActive("Open") Send("DSC0") & $i & Send(".jpg") . . . . <span class="postcolor">;====================================================</span> Next Cram Run("C:\Program Files\FrameMaster2\FrmMstr.exe") WinWaitActive("Information") send("{ENTER}") WinWaitActive("FrameMaster") For $i = 1 to 200 send('{alt}') send("{ENTER}") send("{ENTER}") WinWaitActive("Open") Send("DSC0") & $i & Send(".jpg") . . . . . . <span class="postcolor"> ;==================================================== </span> Next I receive error: C:\Program Files\FrameMaster2\ladp3.au3 (32) : ==> Missing separator character after keyword.: <span class="postcolor"> <span class^ ERROR Link to comment Share on other sites More sharing options...
FireFox Posted January 13, 2009 Share Posted January 13, 2009 (edited) @cramaboule Now you know why Cheers, FireFox. Edited January 13, 2009 by FireFox Link to comment Share on other sites More sharing options...
FireFox Posted January 13, 2009 Share Posted January 13, 2009 @mcnmihail this isnt autoit lines and there is error in his script with send function ... Cheers, FireFox. Link to comment Share on other sites More sharing options...
cramaboule Posted January 13, 2009 Share Posted January 13, 2009 Actully, you could add an Inputbox to enter the "from" and the "to" like I did for one of my script $from= InputBox("from", "from","","",50,30) If $from = "" Or @error = 1 Then Exit $to= InputBox("to", "to","","",50,30) If $to = "" Or @error = 1 Then Exit For $i = $from To $to ... Next Cram My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
FireFox Posted January 13, 2009 Share Posted January 13, 2009 @cramaboule use ;... instead of ... its better for run it without modify it Note : I like your avatar, titeuf lol Keyboard not found ! Press anykey to continue Cheers, FireFox. Link to comment Share on other sites More sharing options...
cramaboule Posted January 13, 2009 Share Posted January 13, 2009 Run("C:\Program Files\FrameMaster2\FrmMstr.exe")WinWaitActive("Information")send("{ENTER}")WinWaitActive("FrameMaster")For $i = 1 to 200send('{alt}')send("{ENTER}")send("{ENTER}")WinWaitActive("Open")Send("DSC0") & $i & Send(".jpg")......<span class="postcolor">;====================================================</span>NextI receive error:C:\Program Files\FrameMaster2\ladp3.au3 (32) : ==> Missing separator character after keyword.: <span class="postcolor"> <span class^ ERRORyes the <span class="postcolor"> is not a autoit script... (Neither the </span>) I do not know why this is here sorry !....; =============================NextI just wanted to explain where to put the 'Next' ( at the end of your script !)Cram My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
cramaboule Posted January 13, 2009 Share Posted January 13, 2009 @FireFox Thanks I like it too... I think it happens once the keyboard problem !!!! so funny Micorsoft... My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
mcnmihail Posted January 13, 2009 Author Share Posted January 13, 2009 @FireFoxThanks I like it too...I think it happens once the keyboard problem !!!! so funny Micorsoft...A few steps and i`m ready Link to comment Share on other sites More sharing options...
cramaboule Posted January 13, 2009 Share Posted January 13, 2009 @mcnmihail good job !!!! My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
mcnmihail Posted January 13, 2009 Author Share Posted January 13, 2009 Run("C:\Program Files\FrameMaster2\FrmMstr.exe") WinWaitActive("Information") send("{ENTER}") WinWaitActive("FrameMaster") For $i = 92 to 95 send('{alt}') send("{ENTER}") send("{ENTER}") WinWaitActive("Open") Send("DSC085" & $i & ".jpg") send("{ENTER}") WinWaitActive("==UNREGISTERED== FrameMaster") send('{alt}') send("{RIGHT}") send("{RIGHT}") send("{DOWN}") send("{DOWN}") send("{ENTER}") send('{p}') send('{a}') send('{alt}') send("{DOWN}") send("{DOWN}") send("{DOWN}") send("{DOWN}") send("{ENTER}") send('{tab},{tab}') send("{ENTER}") send("{ENTER}") ;==================================================== Next DONE! Link to comment Share on other sites More sharing options...
cramaboule Posted January 13, 2009 Share Posted January 13, 2009 Run("C:\Program Files\FrameMaster2\FrmMstr.exe")WinWaitActive("Information")send("{ENTER}")WinWaitActive("FrameMaster")For $i = 92 to 95send('{alt}')send("{ENTER}")send("{ENTER}")WinWaitActive("Open")Send("DSC085" & $i & ".jpg")send("{ENTER}")WinWaitActive("==UNREGISTERED== FrameMaster")send('{alt}')send("{RIGHT}")send("{RIGHT}")send("{DOWN}")send("{DOWN}")send("{ENTER}")send('{p}')send('{a}')send('{alt}')send("{DOWN}")send("{DOWN}")send("{DOWN}")send("{DOWN}")send("{ENTER}")send('{tab},{tab}')send("{ENTER}")send("{ENTER}");====================================================NextDONE!great here is your first script.Now you can optimize your script:like:Run("C:\Program Files\FrameMaster2\FrmMstr.exe")WinWaitActive("Information")send("{ENTER}")WinWaitActive("FrameMaster")For $i = 92 to 95send('{alt}')send("{ENTER 2}") ; send 2 times the ENTER key !;;; My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
mcnmihail Posted January 13, 2009 Author Share Posted January 13, 2009 This is ok, but the program add the same frame to all the photos, now i need to add frame1 to photo dsc01.jpg and frame2 to photo dsc02.jpgso... DSC0200.jpg - frame1DSC0201.jpg - frame2DSC0202.jpg - frame1DSC0203.jpg - frame2DSC0204.jpg - frame1DSC0205.jpg - frame2DSC0206.jpg - frame1DSC0207.jpg - frame2DSC0208.jpg - frame1...DSC0399.jpg - frame2DSC0400.jpg - frame1What I need to change ?Run("C:\Program Files\FrameMaster2\FrmMstr.exe")WinWaitActive("Information")send("{ENTER}")WinWaitActive("FrameMaster")For $i = 92 to 95send('{alt}')send("{ENTER}")send("{ENTER}")WinWaitActive("Open")Send("DSC085" & $i & ".jpg")send("{ENTER}")WinWaitActive("==UNREGISTERED== FrameMaster")send('{alt}')send("{RIGHT}")send("{RIGHT}")send("{DOWN}")send("{DOWN}")send("{ENTER}")send('{p}')send('{a}')send('{alt}')send("{DOWN}")send("{DOWN}")send("{DOWN}")send("{DOWN}")send("{ENTER}")send('{tab},{tab}')send("{ENTER}")send("{ENTER}");====================================================Next 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