Achilles Posted July 26, 2006 Share Posted July 26, 2006 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. expandcollapse popup#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 ) $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 My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted July 26, 2006 Share Posted July 26, 2006 it should be Send(GuiCtrlRead($Percent)) just reading it isnt going to do anything and im sure that paint has IDs so you might want to check out control send Link to comment Share on other sites More sharing options...
Achilles Posted July 26, 2006 Author Share Posted July 26, 2006 it should be Send(GuiCtrlRead($Percent)) just reading it isnt going to do anything and im sure that paint has IDs so you might want to check out control send Yah, the Send worked great, thanks. I don't really have any idea what the ID's would do so unless you care to explain... but it all works fine now. Piano_man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted July 26, 2006 Share Posted July 26, 2006 control IDs of the boxes so you wouldnt have to do a bunch of send tabs and enters and stuff Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now