Created
April 28, 2019 15:31
-
-
Save pigeonhill/75acffb5e3d5fa7dc58709001b3abe13 to your computer and use it in GitHub Desktop.
SGFB Helper Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
SGFB Helper | |
[RATE] = A hijacked button to access the ML Script Menu | |
Version 0.5 | |
Garry George May 2019 | |
http://photography.grayheron.net/ | |
--]] | |
CON = {"ON","OFF"} | |
button = KEY.RATE | |
switched_off = false | |
run = false | |
function run_script(m) | |
if switched_off then return true end | |
if run then | |
run = false | |
menu.open() | |
menu.select("Get Focus Brackets","Run Script"); sleep(1) | |
end | |
return true | |
end | |
function testkeys(kk) | |
run = false | |
if switched_off then return true end | |
if kk == button then | |
run = true | |
return false | |
end | |
return true | |
end | |
Script_Menu = menu.new | |
{ | |
parent = "Focus", | |
name = "Toggle SGFB", | |
help = "Does what it says", | |
choices = CON, | |
update = function(this) | |
if this.value == "ON" then switched_off = false else switched_off = true end | |
end, | |
} | |
event.shoot_task = run_script | |
event.keypress = testkeys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment