Hello everyone !
I'm having issue focusing on the Input dialogue box (so the user can directly enter its Input without doing anything).
The Thing is : If I run the script with Actiona (in "editing mode"), I get the Focus on my dialogue box without any Problem.
If I run it as a script with actexec.exe (so as a stand alone script).. I don't get any Focus on the dialogue box after opening it and I have to manually find it and focus on it.. and that's a REAL ISSUE if I want to automate things..
Has anyone experienced this issue ?
Thanks a lot !
Focus on Input Dialogue Box
Focus on Input Dialogue Box
Last edited by Soulstorm on 02 Jun 2017, 23:19, edited 1 time in total.
Re: Focus on Input Dialogue Box
I am currently developing in Linux (Ubuntu) so I don't (yet) have experience running actexec.exe.
On suggestion might be to run actexec.exe in Windows admin mode since it might be some permissions problem.
But that is only a theory since I have not used windows for some time (although I will soon be adding windows 10 to my development setup).
Add some logging to see what is going on.
On suggestion might be to run actexec.exe in Windows admin mode since it might be some permissions problem.
But that is only a theory since I have not used windows for some time (although I will soon be adding windows 10 to my development setup).
Add some logging to see what is going on.
Re: Focus on Input Dialogue Box
Hi eureka !
Unfortunately, running everything with admin rights doesn't change anything..
Still trying several tweaks, like displaying the desktop first, and only then, open a new input dialogue pop-up... but the problem remains the same... no focus at all on the pop-up.. have to select it manually
I'm currently trying to write a javascript piece of code to execute in Actiona to open up this dialogue box and set the focus on it... but I'm a total beginner in JS and Qt.. and I can't find any relevant help
Unfortunately, running everything with admin rights doesn't change anything..
Still trying several tweaks, like displaying the desktop first, and only then, open a new input dialogue pop-up... but the problem remains the same... no focus at all on the pop-up.. have to select it manually
I'm currently trying to write a javascript piece of code to execute in Actiona to open up this dialogue box and set the focus on it... but I'm a total beginner in JS and Qt.. and I can't find any relevant help
Re: Focus on Input Dialogue Box
I'm surprised that this forum is very quiet.
In my Ubuntu 16.04 OS I cannot recreate the problem you describe.
I created a single action in test.ascr to create an input dialogue
and when it is launched through actexec test.ascr the input field is in focus.
I did try another experiment.
I created another file launch.ascr which has just one command to run actexec test.ascr.
I ran actexec launch.ascr and this launches test.ascr.
You might try that to see what results you get.
In my Ubuntu 16.04 OS I cannot recreate the problem you describe.
I created a single action in test.ascr to create an input dialogue
and when it is launched through actexec test.ascr the input field is in focus.
I did try another experiment.
I created another file launch.ascr which has just one command to run actexec test.ascr.
I ran actexec launch.ascr and this launches test.ascr.
You might try that to see what results you get.
Re: Focus on Input Dialogue Box
Thanks a lot !!!
Opening a second script using the first one worked ! (juste Need to Close the Windows console after entering commands)..
If I run my script by starting it with a console command.. it works and I get my Focus where I want !
I basically did the same as you did.
Launch.ascr and test.ascr
Launch contains the first steps of the script, then Comes the step where I open an Input dialogue box..
I replaced this step with a Windows console Input (start test.ascr), which opens the next part of the script, which starts with an Input dialogue box.. and then it works fine ! I have finally my Focus on the dialogue box !
Opening a second script using the first one worked ! (juste Need to Close the Windows console after entering commands)..
If I run my script by starting it with a console command.. it works and I get my Focus where I want !
I basically did the same as you did.
Launch.ascr and test.ascr
Launch contains the first steps of the script, then Comes the step where I open an Input dialogue box..
I replaced this step with a Windows console Input (start test.ascr), which opens the next part of the script, which starts with an Input dialogue box.. and then it works fine ! I have finally my Focus on the dialogue box !
Re: Focus on Input Dialogue Box
I'm pleased that this glitch was resolved by this work around although the root cause was not found - why no focus?
I still see the odd quirk from time to time. For example if I save script I see a persistent blank popup window which requires me to kill Actiona process to get rid of it. When I have time I will build Actiona from source to investigate. I have done that before using Qt Creator.
If you want to get into Qt I suggest that you install Qt Creator and play with it.
I still see the odd quirk from time to time. For example if I save script I see a persistent blank popup window which requires me to kill Actiona process to get rid of it. When I have time I will build Actiona from source to investigate. I have done that before using Qt Creator.
If you want to get into Qt I suggest that you install Qt Creator and play with it.
Re: Focus on Input Dialogue Box
Tried to make an Input box using a Piece a Javascript code ("code" function in Actiona) (Qt Library included in Actiona):
here is the documentation
http://doc.qt.io/qt-5/qinputdialog.html
and a few examples
https://wiki.actiona.tools/doku.php?id= ... ipt&s[]=qt
Still trying to figure out how to use the entered text in the rest of my Actiona script, like storing it in a variable
I guess there's a "getText" function in the Qt Library.. still experimenting !
works like a charm, I get a nice Input dialogue box with Focus.. and a ton of other Options (which I'm currently not able to use)function main()
{
var a = new QInputDialog();
a.exec();
}
main();
here is the documentation
http://doc.qt.io/qt-5/qinputdialog.html
and a few examples
https://wiki.actiona.tools/doku.php?id= ... ipt&s[]=qt
Still trying to figure out how to use the entered text in the rest of my Actiona script, like storing it in a variable
I guess there's a "getText" function in the Qt Library.. still experimenting !
Re: Focus on Input Dialogue Box
I am a bit puzzled.
I am running Actiona in Ubuntu 16.04
actiona -v
Actiona version 3.9.1, script version 1.1.0
but I don't see where to include Qtlibrary.
I am at a disadvantage since the English documents are lagging behind French documents on wiki.
And I am not multi-lingual.
So I cannot (yet) see how to experiment with Qtscript.
There is a command line option ..
--nocodeqt or -Q
• do not include the Qt library into the code
but i want to include Qt library .. not exclude it.
You are in windows. How did you include Qtlibrary?
...
Now to answer your question about capturing input text as variable ..
The Data Input window has a field .. Output Parameters
Variable:
Simply give the Variable field a name .. such as MyVar
then it can be referred to as $MyVar
and you can click on the green down arrow to select variables.
I am running Actiona in Ubuntu 16.04
actiona -v
Actiona version 3.9.1, script version 1.1.0
but I don't see where to include Qtlibrary.
I am at a disadvantage since the English documents are lagging behind French documents on wiki.
And I am not multi-lingual.
So I cannot (yet) see how to experiment with Qtscript.
There is a command line option ..
--nocodeqt or -Q
• do not include the Qt library into the code
but i want to include Qt library .. not exclude it.
You are in windows. How did you include Qtlibrary?
...
Now to answer your question about capturing input text as variable ..
The Data Input window has a field .. Output Parameters
Variable:
Simply give the Variable field a name .. such as MyVar
then it can be referred to as $MyVar
and you can click on the green down arrow to select variables.
Re: Focus on Input Dialogue Box
I really didn't do anything Special ! The Qt Library is seemingly already included in Actiona.
Just used the "code" function in Actiona like this
https://www.noelshack.com/2017-23-14969 ... plorer.jpg
and this is what I immediately obtain after starting the script
https://image.noelshack.com/fichiers/20 ... plorer.jpg
And by the way, I was asking about the variable for the Javascript (Qt Library) Version of this Input dialogue box !
If you look at my screenshots, I obtain a nice Input dialogue box using the "Code" function.. but I don't really know how to save and use the text I'm writing in the box.. the box just disappears after clicking on "Ok"..
I guess that we need to code everything in Javascript in order to get our Input in a variable usable in the Actiona script.
Just used the "code" function in Actiona like this
https://www.noelshack.com/2017-23-14969 ... plorer.jpg
and this is what I immediately obtain after starting the script
https://image.noelshack.com/fichiers/20 ... plorer.jpg
And by the way, I was asking about the variable for the Javascript (Qt Library) Version of this Input dialogue box !
If you look at my screenshots, I obtain a nice Input dialogue box using the "Code" function.. but I don't really know how to save and use the text I'm writing in the box.. the box just disappears after clicking on "Ok"..
I guess that we need to code everything in Javascript in order to get our Input in a variable usable in the Actiona script.
Re: Focus on Input Dialogue Box
I tried exactly the same code in Code action .. but on running get this error ..
Uncaught exception at <anonymous script, id=140293501838032>:3: ReferenceError: Can't find variable: QInputDialog
I conclude that there are differences between your installation of Actiona (running in Windows) and my Actiona
(running in Linux/Ubuntu).
I intend now to install latest Qt 5.9.0 and try to build the Actiona source from scratch. Unfortunately the Actiona source code seems to be Qt4 but I would prefer to use latest Qt 5.9.0.
That will take some time.
...
To get an answer to your question on QtInputDialog I suggest that you browse through the Qt forum .. e.g.
https://forum.qt.io/topic/75705/qinputdialog/4
but do remember that Actiona uses older Qt4 and not Qt5.
I suggest that you stick to plain javascript (not Qt) to gain some experience with Actiona and the variables are set in the Actiona.
If you can explain briefly what you are trying to automate (web page elements access or other?) I can suggest alternative approaches I have researched.
Uncaught exception at <anonymous script, id=140293501838032>:3: ReferenceError: Can't find variable: QInputDialog
I conclude that there are differences between your installation of Actiona (running in Windows) and my Actiona
(running in Linux/Ubuntu).
I intend now to install latest Qt 5.9.0 and try to build the Actiona source from scratch. Unfortunately the Actiona source code seems to be Qt4 but I would prefer to use latest Qt 5.9.0.
That will take some time.
...
To get an answer to your question on QtInputDialog I suggest that you browse through the Qt forum .. e.g.
https://forum.qt.io/topic/75705/qinputdialog/4
but do remember that Actiona uses older Qt4 and not Qt5.
I suggest that you stick to plain javascript (not Qt) to gain some experience with Actiona and the variables are set in the Actiona.
If you can explain briefly what you are trying to automate (web page elements access or other?) I can suggest alternative approaches I have researched.