Elink Posted December 16, 2013 Share Posted December 16, 2013 I just started AutoIt a few days ago, so I don't really know my way around. I tried looking at the the example scripts and reading through the entire wiki, but that didn't give me any ideas, so... Is there a way to manipulate individual pixels in your GUI? It would be great to just give me a function and its usage. Link to comment Share on other sites More sharing options...
JohnOne Posted December 16, 2013 Share Posted December 16, 2013 I find it very difficult to believe you even read the beginning of the help file, never mind a forum search and the entire wiki. Apart from there being tons of stuff about what you ask, you just asked if AutoIt works on linux. That's like me saying I read an entire car manual and then took it to the garage to have square wheels fitted. Please be truthful. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Elink Posted December 16, 2013 Author Share Posted December 16, 2013 (edited) I never asked if it works on Linux. I asked whether I could cross-compile to Linux - there is a huge difference. And what "tons of stuff" are you referring to? This is only my second post, and given how badly you misinterpreted my first one, I doubt you really even know what you're referring to. Oh, and don't reply to people's questions unless you're doing to say something useful. Telling me how much you hate my post is not constructive, you would have been better off just staying silent. By the way, no need to give me your 'absolute beginners' tutorial. I do know how to use the help file, and I have plenty of programming experience; this is my second language, and I'm already very good at Lua. Don't make assumptions. Edited December 16, 2013 by Elink Link to comment Share on other sites More sharing options...
JohnOne Posted December 16, 2013 Share Posted December 16, 2013 OK. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Mouse Posted December 22, 2013 Share Posted December 22, 2013 This may be late, but whatever. What do you mean by pixels on the GUI? Do you mean the little black dots that you see separated from each other in the GUI editor? They are there for guide lines I believe... they disappear after you run the GUI. Can you be a little bit more specific so I can get back at you? Link to comment Share on other sites More sharing options...
Zedna Posted December 26, 2013 Share Posted December 26, 2013 Here are examples using SetPixel API You just had to add WM_PAINT logic to be your painting on your GUI permanent. Example how to do this is on the forum for example here: '?do=embed' frameborder='0' data-embedContent>> Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Elink Posted January 3, 2014 Author Share Posted January 3, 2014 Come to think of it, I should have been a bit more specific... I was asking if there is a way to manipulate individual pixels on the monitor, instead of inside a traditional GUI. Link to comment Share on other sites More sharing options...
Solution iamtheky Posted January 3, 2014 Solution Share Posted January 3, 2014 This function is all over the place. So your Lua skills may be legit, but your search skills suck. Func _PixelSetColor($XCoord, $YCoord, $Color) Local $dc = DllCall("user32.dll", "int", "GetDC", "hwnd", 0) If Not IsArray($dc) Then Return -1 DllCall("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $XCoord, "long", $YCoord, "long", _ "0x" & StringRegExpReplace(hex($Color,6), "(..)(..)(..)", "\3\2\1")) ; Change to 0xBBGGRR hex colour format. DllCall("user32.dll", "int", "ReleaseDC", "hwnd", 0, "hwnd", $dc[0]) EndFunc ;==>_PixelSetColor jaberwacky 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
jaberwacky Posted January 3, 2014 Share Posted January 3, 2014 Come to think of it, I should have been a bit more specific... No! DatMCEyeBall 1 Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Zedna Posted January 4, 2014 Share Posted January 4, 2014 Come to think of it, I should have been a bit more specific... I was asking if there is a way to manipulate individual pixels on the monitor, instead of inside a traditional GUI. GetDC(0) gives you desktop DC so you can use SetPixel for painting on Desktop the same way as on any GUI window. iamtheky 1 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Elink Posted January 7, 2014 Author Share Posted January 7, 2014 Thanks, boththose, that actually helped, as opposed to some responses (talking to you, jaberwocky6669). Link to comment Share on other sites More sharing options...
iamtheky Posted January 7, 2014 Share Posted January 7, 2014 (edited) eh, sometimes you get mocked and help, other times just mocked. You will eventually be pleased with any responses at all. Here is a small script that sets pixels on the GUI thrown by progresson. Reading all UEZ's stuff should be requisite when learning to color, would have saved me from writing that. Edited January 8, 2014 by boththose jaberwacky 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) 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