9

Slidshow

Posted in Images by Claod 2683 days ago

When we use the slidshow option of geektool, it makes some mistakes and sometime the next image just jump to the first before it continues, and rejump …etc so I made an applescript who copy images into a subfolder and I display the "current.png" in geektool, there is still some jump but it's not the first image anymore. So if someone can help to make a better script he's welcome ;).

You images library will contain 0.png, 1.png, 2.png … => number.png (like the snake animation, or a butterfly xD)

This is the script with explications for modifications (my folder Serpent is on my desktop for the joined script. "the Serpent folder contains all images and the folder slidshow winch contains the "current.png" displayed by geektool so paths are /Users/YOURNAME/Desktop/Serpent/(number.png) /Users/YOURNAME/Desktop/Serpent/slidshow/current.pngThe script simply copy the number.png to current.png with replacing):

set Serpent to ((path to home folder) as string) & "Desktop:Serpent:"

//replace "Desktop:Serpent:" by the path where are located your images (images's library)//

set slidshow to ((path to home folder) as string) & "Desktop:Serpent:slidshow:"

//replace "Desktop:Serpent:slidshow:" by the path of the "current png" wich will bedisplayed by geektool//

set chiffre to 0

set image_defilant to ((POSIX path of slidshow) & "current.png")

delay 0.3

repeat while chiffre ≤ 15

//replace 15 by your images's number//

delay 0.4 

// you need to put delay to let the script copy images, (in mine is 0.3 + 0.4 + 0.3 = 1s) because geektool can refresh only with 1s as minimal.//

set file_01 to ((chiffre as string) & ".png")

set cp_file to ((POSIX path of Serpent) & file_01)

do shell script "cp -r \"" & cp_file & "\" " & image_defilant

set chiffre to chiffre + 1

delay 0.3

if chiffre = 16 then

// replace 16 by your images's count + 1//

    set chiffre to 0

    set file_01 to (chiffre as string) & ".png"

    do shell script "cp -r \"" & cp_file & "\" " & image_defilant

    delay 0.3 

//this delay will be done only at the end, for the last image, to display back the 0.png//

end if

end repeat


after that, add a shell-geeklet, with command: osascript /pathofthe_script.scpt (it's the real path, don't put like that ;) ) and add an image-geeklet to display the "current.png" enjoy and tell me if you can make it better. thx all ;)

Comments

User Avatar
michlemount 2484 days ago
thanks for share
User Avatar
bhatiarasayanudyog 2466 days ago
hi
User Avatar
petiteboitebidon 2462 days ago
thanks

Log in to comment or register here.