Cloudsx Posted May 1, 2006 Share Posted May 1, 2006 (edited) i want to make a button of an picture in autoit i have a screen shot how i want it can some one please help me with it look tho the screenshot to know what i want Edited May 1, 2006 by Cloudsx Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 1, 2006 Moderators Share Posted May 1, 2006 Global $Pic1 = 100000000000000000 $main = GUICreate('') $button = GUICtrlCreateButton('Create Pic Button', 10, 10, 100, 30) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $button Then $Pic1 = GUICtrlCreatePic(@MyDocumentsDir & '\My Pictures\MyPic', 10, 100, 100, 30) EndIf If $msg = $Pic1 Then MsgBox(0, 'Works', 'You clicked the button pic') EndIf WEndObviously you're going to replace @MyDocumentsDir & '\My Pictures\MyPic' with your picture location, and 10, 100, 100, 30, with the position and size you want. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Cloudsx Posted May 1, 2006 Author Share Posted May 1, 2006 thanks for help only i dont understand with the @documentdir what must i do with that i already change the location of my picture Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 1, 2006 Moderators Share Posted May 1, 2006 (edited) thanks for help only i dont understand with the @documentdir what must i do with that i already change the location of my pictureI already explained, replace that with your file location.The first thing you should have done, is looked at GUICtrlCreatePic() in the help file to understand the parameters. If you've already replaced it with the file location, then your fine.Edit:@MYDocumentsDir is a short way, using a Macro, of getting the location of your "My Documents Directory", where is the location of the picture I tested the concept I gave you. Edited May 1, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Cloudsx Posted May 1, 2006 Author Share Posted May 1, 2006 I already explained, replace that with your file location.The first thing you should have done, is looked at GUICtrlCreatePic() in the help file to understand the parameters. If you've already replaced it with the file location, then your fine.i did thanks 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