1x1 Posted October 31, 2022 Posted October 31, 2022 How do i choose the selected results and detect if the value is targeted and do a trigger. Example: I'll search and got 1 results, if the value is 1 then it will say gg.alert('Value is 1 Bye'). If the value is 2 then gg.alert('Unknown, Value is not 1'). Sorry for bad English.
Moderators Collen Posted October 31, 2022 Moderators Posted October 31, 2022 6 hours ago, 1x1 said: How do i choose the selected results and detect if the value is targeted and do a trigger. Example: I'll search and got 1 results, if the value is 1 then it will say gg.alert('Value is 1 Bye'). If the value is 2 then gg.alert('Unknown, Value is not 1'). Sorry for bad English. This? gg.searchNumber("2", gg.TYPE_DWORD) count = gg.getResultsCount() v = gg.getResults(count) if v[1].value == 1 then -- On index 1, only check first value. Make a loop to check all. gg.alert("Value is 1 Bye") else gg.alert("Unknown, Value is not 1") end
1x1 Posted November 1, 2022 Author Posted November 1, 2022 19 hours ago, Collen said: This? gg.searchNumber("2", gg.TYPE_DWORD) count = gg.getResultsCount() v = gg.getResults(count) if v[1].value == 1 then -- On index 1, only check first value. Make a loop to check all. gg.alert("Value is 1 Bye") else gg.alert("Unknown, Value is not 1") end Hell yah, thanks man
Question
1x1
How do i choose the selected results and detect if the value is targeted and do a trigger.
Example: I'll search and got 1 results, if the value is 1 then it will say gg.alert('Value is 1 Bye').
If the value is 2 then gg.alert('Unknown, Value is not 1').
Sorry for bad English.
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.