Skip to content

Instantly share code, notes, and snippets.

@pigeonhill
Created April 28, 2019 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pigeonhill/75acffb5e3d5fa7dc58709001b3abe13 to your computer and use it in GitHub Desktop.
Save pigeonhill/75acffb5e3d5fa7dc58709001b3abe13 to your computer and use it in GitHub Desktop.
SGFB Helper Script
--[[
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