Damein Posted October 13, 2011 Share Posted October 13, 2011 I've done it dozens of times with no problems, but for some reason this time it will not work. $ScoutButton = GuiCtrlCreateButton("Scout", 10, 400, 80, 80, $BS_BITMAP) GUICtrlSetImage($ScoutButton, "Img/Scout/ScoutImage.bmp", 1) GUICtrlSetOnEvent($ScoutButton, "_Scout") I've redownloaded and saved a bmp, editted in paint and saved as a bmp and still nothing. Now if I create a plain Pic control, it displays. But not on the button. Why? Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
enaiman Posted October 13, 2011 Share Posted October 13, 2011 "Img/Scout/ScoutImage.bmp" is not a valid path - use the complete path and it will work. Also, windows path is using backslashes (\) not / SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
Damein Posted October 14, 2011 Author Share Posted October 14, 2011 I assumed that might be a problem too, so I tried both ways with no success. And, if the path is not valid why does it work with GuiCtrlCreatePic? I have the script in the folder before Imgs, so theres no reason its not a valid path. I tried using \ instead of / as well to no avail. Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
Damein Posted October 14, 2011 Author Share Posted October 14, 2011 Hmm, anyone else have any ideas? Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
wraithdu Posted October 14, 2011 Share Posted October 14, 2011 Omit the 3rd parameter? Based on the documentation, the last two parameters to GuiCtrlSetImage are to specify the particular icon in a multi-icon file. I don't think it should be used for a bitmap. Link to comment Share on other sites More sharing options...
Damein Posted October 14, 2011 Author Share Posted October 14, 2011 (edited) No go Here is all the files used, and some not used yet. If someone could take a look and find out exactly why its not working I would be much appreciative. http://www.mediafire.com/?14pw1k5mx2fp4dt Edited October 14, 2011 by Damein Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
Damein Posted October 14, 2011 Author Share Posted October 14, 2011 Oh, you'll have to change the destination folder for the $ScoutButton image, I attempted a full path. Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
Zedna Posted October 14, 2011 Share Posted October 14, 2011 Try to use bitmap with the same size as size of button $ScoutButton = GuiCtrlCreateButton("Scout", 10, 400, 80, 80, $BS_BITMAP) GUICtrlSetImage($ScoutButton, @ScriptDir & "\Img\Scout\ScoutImage.bmp") GUICtrlSetOnEvent($ScoutButton, "_Scout") Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Damein Posted October 15, 2011 Author Share Posted October 15, 2011 I made the image 80x80 and still nothing :/ Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
Damein Posted October 20, 2011 Author Share Posted October 20, 2011 Anyone else have any input on this? I'm still struggling to find a reason why this won't work. Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
Mikeman27294 Posted October 20, 2011 Share Posted October 20, 2011 Instead of using a button and assigning an image to it, just use an image. It will work just like a button, with guigetmsg. So instead og $scoutbutton = guictrlcreatebutton(blah, blah, blah) use $scoutbutton = guictrlcreatepic(blah, blah, blah). Link to comment Share on other sites More sharing options...
Damein Posted October 20, 2011 Author Share Posted October 20, 2011 You know, I just found out something. Originally, I was using this as the code: $ScoutButton = GuiCtrlCreatePic("Imgs/Scout/ScoutImage.bmp",10,400,80,80) GUICtrlSetOnEvent($ScoutButton, "_Scout") Which works fine, but then I decided to add $SS_SUNKEN to make it look nicer and it no longer worked. So I for some reason was like "Oh no, it stopped working randomly!" because I walked away for a bit before testing the Event command. So I removed the $SS_SUNKEN and it worked again. Now, is there a way to make it so the GuiCtrlSetOnEvent still works, with the $SS_SUNKEN parameter? Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
wraithdu Posted October 20, 2011 Share Posted October 20, 2011 That's because a Pic control has a default style of $SS_NOTIFY. You overrode that with $SS_SUNKEN, so it no longer sends click notifications. You need BitOR($SS_NOTIFY, $SS_SUNKEN). RTFM my friend... Link to comment Share on other sites More sharing options...
Mikeman27294 Posted October 21, 2011 Share Posted October 21, 2011 Well spotted. Does your script work now? 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