obj1 = draw.add("rectf", 0, 0, 0, 0, "black","black")obj2 = draw.add("string", 0, 0, "","white","black")obj3 = draw.add("string", 0,0,"","white","black")obj4 = draw.add("string",0,0,"","white","black")
But I’m not sure how to get a pixel colour, ie I can draw to the screen with draw_pixel( x, y, cl ), but how do I read the location?
One thought I have is to draw a particular colour pixel at, say, two locations, and look to see that these are there.
So my question is, have either of you any ideas on how to achieve such an auto redraw function, ie watching within an infinite loop? Is my idea sound? Or is there another way?
If you can track whether your GUI has changed
Any hint how I might track my GUI, ie that it’s not there?
Do you know if one can detect INFO, PLAY, MENU mode is active, ie so I can switch off my drawing.
* Note: exiting and entering ALT mode with M3 Bracketing running MAY trigger the script to 'crash'.
function exitalt(x) -- keeps cursor on place x=x or 1 sleep(99); wait_click(22) if x~=0 then exit_alt() end; wait_click(22) repeat sleep(333) until get_alt_mode() if get_mode() then set_record(false) end --<-- true to rec -- update values EXP_COUNT=string.format("_%04d.",get_exp_count() or 0) INSERT_MAP[1][3]=EXP_COUNT sleep(1000) play_sound(4)end
The normal (non-script) CHDK GUI code actually uses this "guard pixel" technique, but it's not currently available from script.Both of the above would potentially be useful features.
Started by Sterling « 1 2 » Feature Requests
Started by a710is Feature Requests
Started by acid2000 DryOS Development
Started by reyalp General Discussion and Assistance
Started by koshy « 1 2 » General Discussion and Assistance