|
Post by Phenomenal on Mar 21, 2016 1:56:11 GMT
For instance I have a radio button group consisting of 5 buttons numbered 1-5 on the index. How would I assign each button to do a function if selected.
|
|
|
Post by zpt on Mar 21, 2016 5:02:06 GMT
For example:
function t1() print("t1") end function t2() print("t2") end function t3() print("t3") end
functions = {t1,t2,t3}
dialogInit() addRadioGroup("f_number", 1) addRadioButton("function 1", 1) addRadioButton("function 2", 2) addRadioButton("function 3", 3) dialogShow("Select function")
functions[f_number]()
|
|
|
Post by Phenomenal on Mar 23, 2016 2:12:43 GMT
For example: function t1() print("t1") end function t2() print("t2") end function t3() print("t3") end
functions = {t1,t2,t3}
dialogInit() addRadioGroup("f_number", 1) addRadioButton("function 1", 1) addRadioButton("function 2", 2) addRadioButton("function 3", 3) dialogShow("Select function")
functions[f_number]() Fantastic worked like a charm. Second question: I get a java:io exception error with my dragDrop function is this correct?
|
|
|
Post by AnkuLua on Mar 23, 2016 6:46:14 GMT
It seems correct. What's the error message and on which line?
|
|
|
Post by Phenomenal on Mar 23, 2016 12:15:56 GMT
It seems correct. What's the error message and on which line? That's the error and the 4th line down is 178
|
|
|
Post by AnkuLua on Mar 23, 2016 12:22:54 GMT
Unfortunately, one required command is missed in your phone. It happens in some rooted devices. Try to enable "(BETA) Use alternative method for touches except click." in settings.
Or try to flash factory ROM.
Good luck.
|
|
|
Post by Phenomenal on Mar 23, 2016 20:52:15 GMT
Unfortunately, one required command is missed in your phone. It happens in some rooted devices. Try to enable "(BETA) Use alternative method for touches except click." in settings. Or try to flash factory ROM. Good luck. I just started getting this error after many fine runs. Both my phone and 2 different nox emulations. But my s6 runs fine
|
|
|
Post by Phenomenal on Mar 23, 2016 22:55:23 GMT
What's the correct syntax for a Timer(). You guys don't have any examples. So I made this one but isn't correct.
|
|
|
Post by AnkuLua on Mar 24, 2016 0:05:06 GMT
There is no argument for set(). There is an example in following link ankulua.boards.net/thread/13/advanced-methodst = Timer() wait(1) print(t:check()) wait(1.2) print(t:check()) wait(1.3) print(t:set()) wait(1.5) print(t:check()) And you don't need the last "end".
|
|
|
Post by Phenomenal on Mar 25, 2016 0:47:40 GMT
There is no argument for set(). There is an example in following link ankulua.boards.net/thread/13/advanced-methodst = Timer() wait(1) print(t:check()) wait(1.2) print(t:check()) wait(1.3) print(t:set()) wait(1.5) print(t:check()) And you don't need the last "end". Ended up making an awesome timer. I'll put up a thread for it as an example. Also, using numberocr had it down but when I added a similarity variable things went wack is this the correct syntax and should I use higher resolution images? If so would it mess up since the rest of my screenshots are in lower res. Line 109 starts with "local c"
|
|
|
Post by AnkuLua on Mar 25, 2016 1:12:04 GMT
numberOCR does not have similar method.
You can set to different similarity before numberOCR and write the original value back after numberOCR. Suggest to highlight the region before numberOCR to make sure the region is right. Here is example from seven knights script.
function lvNum() local preMinSimilarity = Settings:get("MinSimilarity") Settings:set("MinSimilarity", 0.6) local anchor = upperRight:wait("lvs.png") local numRegion = Region(anchor:getX() - 100, anchor:getY(), 100, anchor:getH()) numRegion:highlight(1) local num = numberOCR(numRegion, "lvn") Settings:set("MinSimilarity", preMinSimilarity) return(num) end
If you have different resolution for numbers. You can also set the new compareDimension before numberOCR and set it back after numberOCR.
|
|
|
Post by Phenomenal on Apr 3, 2016 22:25:43 GMT
How can I use an existsClick method in conjuction with a region. For example I have a region defined and I want to use the existsClick method in that specific area.
|
|
|
Post by Phenomenal on Apr 3, 2016 23:38:07 GMT
Also started to get this strange error on basic methods.
|
|
|
Post by AnkuLua on Apr 3, 2016 23:57:39 GMT
How can I use an existsClick method in conjuction with a region. For example I have a region defined and I want to use the existsClick method in that specific area. region = Region(640, 360, 640, 440) region:existsClick("target.png")
|
|
|
Post by AnkuLua on Apr 3, 2016 23:59:28 GMT
Also started to get this strange error on basic methods. If it did not happen before, check what's changed recently. If rooted, it's most possible by the root process.
|
|