How to get control dial rotation event through is_key? - Script Writing - CHDK Forum

How to get control dial rotation event through is_key?

  • 2 Replies
  • 4311 Views
How to get control dial rotation event through is_key?
« on: 07 / June / 2011, 18:09:28 »
Advertisements
Is there a way to check in script if an user turns the control dial? In other words: how to use the control dial to operate script? I'm using sx130 IS.
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: How to get control dial rotation event through is_key?
« Reply #1 on: 10 / June / 2011, 14:30:40 »
Sorta a newbie myself, but I don't recall seeing the dial settings in the list of accessible buttons with is_key.

But here's an idea... could you setup a monitor which checks the get_prop 0 value instead of a wait_click. Then, if the value changes, it would be like detecting a dial mode rotation.
ie:

Code: [Select]
get_prop 0 origvalue

while 1
sleep 1000
get_prop 0 newvalue
if newvalue<>origvalue then gosub "routine"
wend
end

:routine
print "Dial has changed to value:", newvalue
origvalue=newvalue
return


Re: How to get control dial rotation event through is_key?
« Reply #2 on: 10 / June / 2011, 15:55:30 »
Ok, but this gives me MODE DIAL position, I need CONTROL DIAL;p This wheel at the back (in the same place, where up/down/left/right keys.

I've found a walkaround by peek memory adress that is correct for my camera. So the code is not universal, nevertheless might be ported.

Thx for answer;)
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal