pizza Posted September 17, 2010 Share Posted September 17, 2010 I want to click on an actual image, no link, text etc. just an image. I tried messing around with the ckecksum function but had no luck. Help please? Thanks! Link to comment Share on other sites More sharing options...
XKahn Posted September 17, 2010 Share Posted September 17, 2010 Hmm, well you should take a look at my script GTCard here. What you want to examine is how to load a jpg imagine using;;Assumes image.jpg is 200 x 200 pixels. $my_click_image = GUICtrlCreatePic("image.jpg", 0, 0, 200, 200)Then in your GUI loop you need to use either case or if statement;GuiSetState() $msg = GUIGetMsg() While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $my_click_image ;Do something neat Case $msg = $another_image ;Do something else EndSelect ;This is the if version you won't need both examples If $msg = $my_click_image Then ;Do something neat EndIf WEndThe "cards" in my program are just clickable jpegs. You will need to download the images and other files to make the script work.Hope that helps. Link to comment Share on other sites More sharing options...
wakillon Posted September 17, 2010 Share Posted September 17, 2010 You can try Opt ( "GuiOnEventMode", 1 ) $_GUI = GUICreate ( '', 400, 300 ) $_Pic = GUICtrlCreatePic ( @ProgramFilesDir & "\AutoIt3\Examples\GUI\merlin.gif", 0, 0, 136, 142 ) GUICtrlSetTip ( $_Pic, "Open Youtube.com !" ) GUICtrlSetOnEvent ( $_Pic, '_ClickOnPic' ) GUISetState ( @SW_SHOW ) While 1 Sleep ( 20 ) WEnd Func _ClickOnPic ( ) ShellExecute ( "http://www.youtube.com/" ) EndFunc ;==> _ClickOnPic ( ) AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts 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