Jump to content

Need some help


Recommended Posts

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

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

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

Send("DSC0" & $i & ".jpg")
Arrr! of course !....

I understand now why all my script are not working !!!!! :-)

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

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

yes the <span class="postcolor"> is not a autoit script... (Neither the </span>) I do not know why this is here sorry !

.

.

.

.

; =============================

Next

I just wanted to explain where to put the 'Next' ( at the end of your script !)

Cram

Link to comment
Share on other sites

@FireFox

Thanks I like it too...

I think it happens once the keyboard problem !!!! so funny Micorsoft...

Link to comment
Share on other sites

Link to comment
Share on other sites

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

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!

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 95

send('{alt}')

send("{ENTER 2}") ; send 2 times the ENTER key !

;

;

;

Link to comment
Share on other sites

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.jpg

so...

DSC0200.jpg - frame1

DSC0201.jpg - frame2

DSC0202.jpg - frame1

DSC0203.jpg - frame2

DSC0204.jpg - frame1

DSC0205.jpg - frame2

DSC0206.jpg - frame1

DSC0207.jpg - frame2

DSC0208.jpg - frame1

.

.

.

DSC0399.jpg - frame2

DSC0400.jpg - frame1

What I need to change ?

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...