Jump to content
Sign in to follow this  
mcnmihail

Need some help

Recommended Posts

mcnmihail

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

Share this post


Link to post
Share on other sites
FireFox

@mcnmihail

For 4 tab keys to send use : Send("{TAB 4}")

Then you can check for MouseClick ; ControlClick ; etc...

Cheers, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
cramaboule

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

Share this post


Link to post
Share on other sites
mcnmihail

@mcnmihail

For 4 tab keys to send use : Send("{TAB 4}")

Then you can check for MouseClick ; ControlClick ; etc...

Cheers, FireFox.

Tnx!

will do

Share this post


Link to post
Share on other sites
mcnmihail

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}")

Share this post


Link to post
Share on other sites
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}")

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

Share this post


Link to post
Share on other sites
FireFox

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


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
cramaboule

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

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

Share this post


Link to post
Share on other sites
mcnmihail

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

Share this post


Link to post
Share on other sites
FireFox

@cramaboule

:) Now you know why :lmao:

Cheers, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
FireFox

@mcnmihail

this isnt autoit lines and there is error in his script with send function ... :)

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
cramaboule

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

Share this post


Link to post
Share on other sites
FireFox

@cramaboule

use ;... instead of ... its better for run it without modify it :lmao:

Note : I like your avatar, titeuf lol

Keyboard not found ! Press anykey to continue :)

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
cramaboule

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

Share this post


Link to post
Share on other sites
cramaboule

@FireFox

Thanks I like it too...

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

Share this post


Link to post
Share on other sites
mcnmihail

@FireFox

Thanks I like it too...

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

A few steps and i`m ready :)

Share this post


Link to post
Share on other sites
cramaboule
mcnmihail

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!

Share this post


Link to post
Share on other sites
cramaboule

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 !

;

;

;

Share this post


Link to post
Share on other sites
mcnmihail

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

Share this post


Link to post
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
Sign in to follow this  

×