Sign in to follow this  
Followers 0
Achilles

$variablle = text?

3 posts in this topic

#1 ·  Posted (edited)

Hello... I'm doing this to resize pictures. However I have one problem. I can't get a variable to type what is stands for. It should open paint, go to sketch and skew, then it should send the input value but it's not sending anything. Once again any help would be nice.

#include <GUIConstants.au3>
GUICreate("How many photos?", 220, 150, -1, -1)
GuiCtrlCreateLabel("Insert how many pictures you want resized" & @CRLF & "and then insert the percentage of the new" & @CRLF & "picture compared to the old picture.", 5, 5, 220, 40 ) ;you'll need to edit this to make it work
$numpic = GuiCtrlCreateInput("", 20, 60, 25, 20)
GuiCtrlCreateLabel("Pictures", 50, 63)
$percent = GuiCtrlCreateInput("50", 20, 90, 25, 20)
GuiCtrlCreateLabel("% scaled", 50, 94)
GuiCtrlCreateButton("Exit", 10, 120, 60, 20)
GuiCtrlCreateButton("Back", 80, 120, 60, 20)
$ok= GuiCtrlCreateButton("OK", 150, 120, 60, 20)
GUISetState(@SW_Show)
$count = 1
While 1
    $msg = GUIGetMsg()
        Select
    Case $msg = $GUI_EVENT_CLOSE
        Exit
        Endselect
    If $msg = $ok then
        OpenMyPics()
        Do
        ResizePicture()
        $count = $count + 1
             Until $count > GUICtrlRead($Numpic)
      Exit
    Endif
Wend        

Func OpenMyPics()
    ;Send("{tab 2}")
    ;Send("^C")
    Send("#r")
    Sleep(500)
    Send("C:\Documents and Settings\test\My Documents\My Pictures\Resizing")
    Send("{enter}")
    Send("{down}")
    Send("{up}")
    EndFunc

Func ResizePicture()
    Send("{enter}") 
    Sleep(1200) ; open top left picture
    Send("{alt}")
    Send("!is") 
    Sleep(600)
    GUICtrlRead($Percent) ;this part isn't sending anything
    Sleep(1200)
    Send("{tab}")
    GUICtrlRead($Percent)
    Sleep(1200)
    Send("{enter}")
    Sleep(500)
    Send("!fs") 
    Send("{enter}")
    Sleep(100)
    Send("!fx") 
    Sleep(500)
    Send("{down}")
     Endfunc

Piano_man

Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites



no need to post the topic twice xD i shouldnt even be posting this but who cares ahhaha

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