|
Post by AnkuLua on Oct 13, 2015 16:39:34 GMT
Is the continueClick too fast? Why is the high speed problem? Another curiosity. It's not necessarily too fast, it just doesn't run long enough. And two continueClicks right after eachother have a "pause" inbetween. If I'm not clear enough, please let me know  Yes. You are right. It's not possible to avoid the "pause" in between. There is overhead because Android does not provide built-in method. And the pause will vary from device to device. In version 3.0.0, Timer object is provided. User can measure the duration of continueClick on their device. Then, they can adjust the click number accordingly. Will provide setting in next version.
|
|
|
Post by Kako on Oct 14, 2015 19:24:30 GMT
Of what type should the timeout be? Is it seconds, or something else?
|
|
|
Post by AnkuLua on Oct 15, 2015 0:02:10 GMT
Of what type should the timeout be? Is it seconds, or something else? seconds. The accuracy is milliseconds. 1.003 means 1 second and 3 milliseconds.
|
|
|
Post by zpt on Oct 28, 2015 1:52:57 GMT
Is there any difference between longClick() and click() from application's point of view? On screen I have a deck of cards with checkboxes, cards can be short-clicked for info, or long-clicked for start of drag-n-drop. Checkboxes doesn't responds to long clicks by fingers.
The problem is the game sees click() in rare occasions, it's too short for it, but longClick(0.001) gives long click in terms of game. Both takes ~0.005-0.015 seconds (by os.clock, Timer shows ~0.5-0.65 seconds), but in those rare cases when the game sees click() it works as short click (about 2 of 10), in all other cases click() gives no effect at all. longClick(0.001) takes same time, but game sees every click (however as long click only).
For all other game's elements longClick(0.2) works fine, but there is no more such elements sensible to click time in such manner. All in Daemon mode, no root, device is powerful enough for this game and AnkuLua (Xperia Z3 Tablet Compact), no other applications in background. Can't test background touch mode, still on trial version (can't buy app while still don't know how to avoid this problem).
Here is my test code:
loc = Location(595,482) times = {} l = 0
while l<10 do a = os.clock() --longClick(loc,0.001) --change between longClick and click click(loc) b = os.clock()-a table.insert(times, b) wait(1) l=l+1 end
for k,v in pairs(times) do print(k,v) end
|
|
|
Post by AnkuLua on Oct 28, 2015 8:27:56 GMT
The difference between longClick() and click() is as the function names.
What's the game? Let us try it.
It seems that you use AnkuLua on more than one games. Please give AnkuLua five start in google play, if not did it yet.
|
|
|
Post by zpt on Oct 28, 2015 11:02:57 GMT
|
|
|
Post by AnkuLua on Oct 28, 2015 16:10:57 GMT
Just find a bug in longClick. The bug is fixed in version 3.2.0 Please update to the version. Valkyrie Crusade doesn't response well to original click method. A new click method is introduced. In version 3.2.0, you can use following function to enable the new method setAlternativeClick(true) Then you can use click as usual.
|
|
|
Post by zpt on Oct 29, 2015 0:11:23 GMT
Thank you for fast update, got pro version, click() works perfect. Got two new problems: -Can't use dragDrop() in mentioned game specific on this screen i.imgur.com/3azTVUR.png to scroll list, in other parts of game that are able to use dragDrop() it works, as in another apps, tested with this: Settings:setCompareDimension(true, 1920) Settings:setScriptDimension(true, 1920) dragDrop(Location(965,500),Location(965,100)) tested with and without setAlternativeClick(true), tested with different dragDrop timing settings, may be the game needs very specific timing settings for this part of interface, will try. Avoided this by using zoom(965, 500, 965, 100, 965, 530, 965, 530, 300) (same coordinates as in dragDrop()) for scrolling those element, and here is the second problem: -Can't use clicks after zoom in any application (tested with the game and in sketch application) test code: Settings:setCompareDimension(true, 1920) Settings:setScriptDimension(true, 1920) setAlternativeClick(true) click(Location(1200,800)) zoom(965, 500, 965, 100, 965, 530, 965, 530, 300) wait(10) click(Location(1168,869)) Tested with and without setAlternativeClick(true),tested with different pause after zoom, tested with longClick(). First click() works as intended, second click() gives nothing, BUT second click() will work if I'll touch the screen during wait(). Tryed stopLongClick() after zoom(), just in case =) P.S. All in Daemon mode, no root, pro version.
|
|
|
Post by AnkuLua on Oct 29, 2015 3:25:40 GMT
Thanks for the support of pro version.
-Can't use dragDrop() in mentioned game specific on this screen i.imgur.com/3azTVUR.png to scroll list, in other parts of game that are able to use dragDrop() it works, as in another apps, tested with this: Another special case for this game. Version 3.2.1 is updated.
-Can't use clicks after zoom in any application (tested with the game and in sketch application) We tested your code and found no problem on our devices. The "OK" button is clicked as expected.
|
|
|
Post by zpt on Oct 29, 2015 16:33:26 GMT
Sorry, but update didn't help. Did clean install of AnkuLua (with reboot), still first code example scrolls the list, but don't click after zoom() (in game and in sketch application, used for test), second example doesn't scroll (only in this part of interface), but does click. Tested different settings of setDragDropStepCount(), with 199 and more dragDrop() does only click in first point (in game and sketch app for test)
Settings:setCompareDimension(true, 1920) Settings:setScriptDimension(true, 1920) setAlternativeClick(true) zoom(965, 500, 965, 100, 965, 530, 965, 530, 300) wait(3) click(Location(1168,869)
Settings:setCompareDimension(true, 1920) Settings:setScriptDimension(true, 1920) setAlternativeClick(true) dragDrop(Location(965,500),Location(965,100)) wait(3) click(Location(1168,869)) And, after upgrade to pro, AnkuLua sets tablet from silent mode to vibro despite the absence of setVolumeDetect(true) in script, even with setVolumeDetect(false). Unexpected vibrosignal from notification during night is somewhat annoying:)
All in Daemon mode, no root, pro version (tested with trial too). Device is Xperia Z3 Tablet Compact, Android 5.1.1, latest official software version, no modifications, no particular applications that could itterupt anything.
|
|
|
Post by AnkuLua on Oct 30, 2015 0:42:50 GMT
In the Valkyrie Crusade, dragDrop should be the command to use. Let's focus on dragDrop first. Tried the following code on our machine, ASUS ME173X. It works as expected. Settings:setCompareDimension(true, 1920) Settings:setScriptDimension(true, 1920) setAlternativeClick(true) dragDrop(Location(965,500),Location(965,100)) wait(3) click(Location(1168,869)) Here is the recorded video. www.dropbox.com/s/o4uo2gpfbq8esyk/Record_20151030_081846.wmv?dl=0You also mentioned "in sketch application". What's the sketch application? For vibration from silent mode, please make sure that neither "Play when Volume Up" nor "Stop when VolumeDown" is enabled. 
|
|
|
Post by zpt on Oct 30, 2015 1:41:04 GMT
You also mentioned "in sketch application". What's the sketch application? Used default Sony drawing application, just tested with SketchBook Express, same results. Here is my record video of exact same script. AnkuLua settings exactly match your screenshot.
|
|
|
Post by AnkuLua on Oct 30, 2015 2:35:57 GMT
Please try different settings of setDragDropTiming(downMs, upMs)
Thanks for your patience.
|
|
|
Post by zpt on Oct 30, 2015 2:49:54 GMT
Please try different settings of setDragDropTiming(downMs, upMs) Tested with this: Settings:setCompareDimension(true, 1920) Settings:setScriptDimension(true, 1920) setAlternativeClick(true)
t = 25 while t< 1025 do toast(tostring(t)) setDragDropTiming(t, t) dragDrop(Location(965,500),Location(965,100)) wait(1) t=t+25 end Nothing.
|
|
|
Post by bazinga on Nov 5, 2015 15:55:08 GMT
How to run a log file? file is nil
file = io.open("log.txt", "a") file:write("this is a test") file:close()
|
|