Sign in to follow this  
Followers 0
JuggaloZeke

Trying to create a script to simulate a slideshow.

5 posts in this topic

$pic = 0
Send(""{F6}")
Do
    Send(--Picture Address--$i)
    $pic = $pic + 1
Until $i = 4000

I have over 4000 pictures that I want to make a slideshow out of using an AutoIt script. The idea is to make it type in the picture address and then keep going to the next picture, ie 0001 to 0002. Thing is I cant figure out what so do with the "Send(--Picture Address--$i)" line or how to make it type with four digit places, such as 0001.

I want it to press F6 once to activate the address bar in Explorer and then type [Picture Address]\0001.jpg so on and so forth.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Try this:

$pic = 0
Send("{F6}")
Do
    Send("--Picture Address--" & StringRight("000" & String($pic),4) & ".jpg")
    $pic = $pic + 1
Until $pic = 4000

Edit this also works: Send("--Picture Address--" & StringFormat("000%u",$pic) & ".jpg")

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

That did work great, but I did have a few problems here and there. I just decided to replace all of that with

Opt("WinTitleMatchMode", 2)
$pic = 1
WinWaitActive("4190")
Do
    Send("{DOWN}{ENTER}")
    Sleep(100)
    Send("!{SPACE}x")
    $pic = $pic + 1
    Sleep(3000)
    Send("!{F4}")
Until $pic = 4230

Now I have a new problem. I just want a little script to run in the background that I can have wait for a hotkey to be pressed before sending a macro... but when I run the script it ends itself!

Share this post


Link to post
Share on other sites

About the topic: Why not use FileFindFirst/NextFile ?

About the new problem: Can you show the code?

Share this post


Link to post
Share on other sites

As for the topic: Didn't realise those commands existed but I do now.

As for the new problem:

HotKeySet("a", "GizA1")

Func GizA1()
    Send("{RIGHT}{DOWN}{LEFT}Z")
EndFunc

That's all I have. I'm guessing it just reads it and then ends itself. I just want it so stand-by and wait for key presses before sending macros to the game.

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  
Followers 0