Skip to content

Instantly share code, notes, and snippets.

@pigeonhill pigeonhill/1GFB.lua
Created Apr 28, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.