Quick new question!

Post here if you need help using Actiona
Post Reply
ante
Posts: 4
Joined: 13 Apr 2018, 11:19

Quick new question!

Post by ante »

Hi!

Awesome product had hours of fun creating scripts :D Have some issues understanding all of the sweet functions though so a lot of trial and error.

One thing is the variable's.

What I would like to achieve:

I have a 0 number that I would like to increase by say 10 and the script should input this into a question box and do a lot of other things but I want it to always increase by 10. What I've done so far is it's finding an image on the window screen and the confidence level *normally 90/100 and I'm using that as a base number that I would like to increase by 10 how can I do that? Or is their any other smart way of increasing a value by ten and input it into a textbox?

So now I'm able to read an image output that into a confidence variable and use that variable to set a number. I have seen another post on this forum talking about Line and wanted that to increase +1 and saw the answer use the code and type line++ etc. I'm however not sure where and have tried numerous different ways and it still only use the first variable setting *thats the confidence score.

Any help would be greatly appriciated.

//A :D

Side note> Is there any more in depth help then the one online? To better explain to me how the actions work and what it expects and possibly any examples for me to better understand?
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Quick new question!

Post by eureka »

Welcome. I am still myself trying to fathom the depths of Actiona.

I'm not too clear on how you plan to increment, and what.

But as one idea I would dive into the French forum to search for more insights into javascript coding.

e.g.

https://www.jmgr.net/forum/viewtopic.php?f=25&t=1307

I agree that the online manuals are a bit thin and trial and error is needed..
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Quick new question!

Post by eureka »

P.S. Here is another example of increment variable (again in French forum) ...

https://www.jmgr.net/forum/viewtopic.php?f=30&t=9622
ante
Posts: 4
Joined: 13 Apr 2018, 11:19

Re: Quick new question!

Post by ante »

:mrgreen:

Thanks for the reply, my french is 0 and the translator on google is not far off it. So even harder to understand what to do!

Maybe if there is another way around this?

I need to move XY cordinates in a window then scan off that window, if it does not find the image I am looking for then move the window again. Maybe I could use the mouse movement but find it a bit dodgy ;) I can put XY cordinates into a box so if I could get a base number and then just increment that after each action I would be home safe! :!: :wink:
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Quick new question!

Post by eureka »

my french is 0
So is mine but you can get the general idea from the javascript.

Reading your post again, you don't indicate if you are on Windows or Linux since external tools might be used.

But as a general idea could you not

use the Window action to increment the x,y location of your target window
search for your target
if target not found use Loop action to loop back (not forward) to again increment window position
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Quick new question!

Post by eureka »

I'm adding some notes on further research into this.

This very old thread I found looks as if it might match your requirements to "pan" the window to acquire a target image.
At least that is my understanding of your requirements.

https://www.jmgr.net/forum/viewtopic.ph ... ndow#p2762
My first question is, is there some way to make actionaz search for a image in a exact location? or a small selection? what i want to do is make actionaz move the cursor then after a couple seconds make it search for a image on the saved position of the cursor or a small selection around it.
reply by jmgr ...
What you can do is search within a window or an image. There is no way to directly select a zone, but this could be added in a future release. In the meantime you will have to search on the whole screen.
If you know JavaScript you can do that using the "code mode" by clicking on the red triangle on each field. This allow you to enter some JavaScript code that will be evaluated when the action is executed. See the documentation :

http://wiki.actionaz.org/doku.php?id=en:code
More references found (saves diving into French forum) ...

https://wiki.actiona.tools/doku.php?id=en:code

https://wiki.actiona.tools/doku.php?id= ... ore:window

This explains javascript coding mode ...

https://wiki.actiona.tools/doku.php?id= ... troduction
ante
Posts: 4
Joined: 13 Apr 2018, 11:19

Re: Quick new question!

Post by ante »

Might have to learn a bit of java so :D

Thanks for the effort but neither of these seem to talk about what I'm after, I will try the following though:

CLICK *hold mouseclick
CURSOR PATH ~move it a bit
Find Image ~look for image
LOOP ~cool, didn't think of that

~~find image: if not found action / do nothing if found action: move to line "ALARM"
It'll alarm and stop :)

Think that's the only way for me not knowing really how to java works *today

Cheers
A.
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Quick new question!

Post by eureka »

You mean "javascript" and not "java".

You might experiment with another tool which uses Powerpoint.

http://slides.sikuli.org/

But this only works in browser windows.
ante
Posts: 4
Joined: 13 Apr 2018, 11:19

Re: Quick new question!

Post by ante »

Thanks , java script correct ;)

So far this easy way seems to work “ok” if yet not 100% precise it might do the job. Its within an android emulator so that last link wouldnt work all that well. Thanks though
Post Reply