Jump to content

Help


RezaHaxz

Recommended Posts

How to make auto turn on/off when pressing gg.icon

 

function A()

gg.searchNumber('100', gg.TYPE_DWORD)

t = gg.getResults(2)

gg.addListItems(t)

gg.clearResults()

B()

end

 

function B()

gg.searchNumber('300', gg.TYPE_DWORD)

t1 = gg.getResults(2)

gg.addListItems(t1)

end

 

--This Will Be AUTO ON/OFF

--ON

function CHANGE()

--

gg.editAll("1" ,gg.TYPE_DWORD)

end

 

--OFF

function REVERT()

if t ~= nil then gg.setValues(t1) end

end

Link to comment
Share on other sites

4 hours ago, RezaHaxz said:

How to make auto turn on/off when pressing gg.icon

 

function A()

gg.searchNumber('100', gg.TYPE_DWORD)

t = gg.getResults(2)

gg.addListItems(t)

gg.clearResults()

B()

end

 

function B()

gg.searchNumber('300', gg.TYPE_DWORD)

t1 = gg.getResults(2)

gg.addListItems(t1)

end

 

--This Will Be AUTO ON/OFF

--ON

function CHANGE()

--

gg.editAll("1" ,gg.TYPE_DWORD)

end

 

--OFF

function REVERT()

if t ~= nil then gg.setValues(t1) end

end

Use gg.isClickedUiButton()
true if the button has been clicked since the last check. false - if there was no click. nil - if the button is hidden.
Example from help:

gg.showUiButton()

while true do

if gg.isClickedUiButton() then

-- do some action for click, menu for example

local ret = gg.choice({'Item 1', 'Item 2', 'Item 3'}) or os.exit()

gg.alert('You selected:', ret)

end

gg.sleep(100)

end

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.