How to specify in Rebol3 the open/exe action for the R3 script : the R3 exe - rebol

related to this question:
How do you start a Rebol3 GUI script without the console showing?
As I can't quote there because of my low reputation, I opened a new more specific question.
How can that be done exactly, or where can I find more details about how to do it?
I searched now quite some time, but didn't find detailed info.
As I'm new to REBOL3, it's kind of hard to get through the different versions. I use the SAPHIRON build.
Code is just a simple first test:
REBOL [title: "first test"]
do %r3-gui.r3
load-gui
view [text "Hello Andreas!"]
Any help is welcome.

For Windows for example, you can associate to rebol scripts, a default program to run.
If your file script name ends with .r3, and if you want to run r3-view.exe when you double clic a .r3 script:
- for windows: right clic the .r3 script, and then clic"open with", then check "default program" and choose "r3-view.exe", then clic OK.

Related

Upload File / Image using Dropzone.js with Selenium-Ide

Hi Everyone
I'm new to selenium, please bear with me, and guide me a little bit.
So I want to make an automation process with selenium-ide, with the hope that this automation will make testing in my project easier.
So using selenium-ide and trying to upload a file using dropzone.js, here is the normal flow.
Click the button 'Add Photo'
Windows explorer will pop up
After the file is selected, on the background, 'dropzone' will manipulate the file while opening a pop up "Image Editor"
After clicking "Confirm" the file will be uploaded to the server.
What I want to accomplish is "How can I manipulate click/select the file after file explorer opened, using selenium-ide? or is it possible?"
I have already spent hours trying to find the solution and have had no luck.
I try using the command "type" or "send key", and also on my discovery we could use javascript directly with the command "execute script", but I just don't know how to make it work
What I expect is, I could manipulate the manual proses of the selection file with automation from selenium-ide.
Thank You.
I got my own answer guys!
My goals above can be solved using selenium-ide command called "type",
Here is the explanation:
Command:
I use "type", according to selenium-ide it will store value to your element.
Target
Dropzone will create its own element 'input file' and it's hidden, of course, so this is one that we should get, instead of your own input file. You may find it with class dz-hidden-input, and since I have many file inputs I use an array at the end of XPath [{$check}]
Value This one is the exact path where you put your file locally.
**The Logic / How it works: **
with this solution, we don't need to trigger file explorer, because the above code will inject the image inside dropzone file input, and since dropzone listens to their file input which is dz-hidden-input, it will act the same way that we choose the file from file explorer.
I hope this answer will help someone whos bumped into the same problem.
Kudos XD

QtCreator CMake editor indenting

I have my Qt Creator 3.1.1 setup to indent with 4 spaces on Tab, but for some reason tab key doesn't work when I edit CMakeLists.txt. This only happens when I open it with CMake Editor, it works when I use Plain Text Editor. Is this a bug or I need to configure it somehow to make Tab key work?
I had exactly the same problem.
This issue occured because I have enabled auto-indent. The value in the "Preferences->Text Editor->Behavior" tab "Typing->Tab key performs auto-indent" was set to something else to "Never".
So to fix this issue you you need to set "Tab key performs auto-indent" to "Never".
Additionally to the answer above, inside 'Options' window and 'Behavior' pane, have a look at 'Tab Policy' section as well as 'Cleanups upon Saving' - and check if it is really what you expect.
For me the settings there were not what I have expected and it was triggering issues, eg. in a Makefile, first command of a task looks like line continuation for Qt Creator so, upon saving, it was "cleaning" (= breaking) the indentation by replacing it with 4 spaces, that was incoherent with overall indentation in the script. Et voilĂ  - error, make didn't work correctly!
As always, it is a very nice tool but one needs to know how to use it...

Verify Text on Selenium IDE

I'd like to verify some text on a webpage but seems that Selenium IDE is not finding it.
I want to find the word "AMS" on a page, and I'm using like this:
command: verifyTextPresent // target: AMS // value:
Here's a screenshoot to make it easier to understand (sorry about the black squares, they're sensitive information):
http://oi39.tinypic.com/w0a4m.jpg
I think you should check for Global AMS Director whole value.
OR
Select AMS value using mouse and after that right click on and select "verifyTextPresent AMS" command
It will add your command in Selenium IDE and it should work fine.
I tried that on "Selenium Wiki page" and it was working fine.
Same issue I was facing. Please try VerifyText instead. It worked for me

How to Run Ada Code in GPS

In GNAT Programming Studio, how do you run the program? I see it compiled successfully, but I do not see where my program has started running. I would like to test it.
First, you have to select your Main procedure in the project properties (see the "main files" tab). You can actually choose multiple files for multiple executables.
Next, you have to build it - either by pressing F4 for the first Main File in the list, or by choosing it in the Build->Project submenu, or by choosing "build all" in the Build->Project submenu (or use the toolbar for the menu entries).
Last, you can choose, which of your Main Files to run by choosing it in the Build->Run menu, or by pressing shift+F2 for the first file in the list. Enter the parameters in the dialog and press OK.
There should be a new Tab next to the Messages panel, where all output is placed, and you can use it for input, too. You could choose to use an external terminal in the run dialog.
If you want to debug it, have a look at the Debug menu. Read the documentation for more information.
Last, you can choose, which of your Main Files to run by choosing it in the Build->Run menu, or by pressing shift+F2 for the first file in the list. Enter the parameters in the dialog and press OK.
Whatever I enter here, e.g. either the name of the project, Primes_Count or the name of what I see to be the 'executable', Primes_Count.o, it just does not run.
And I get this message output on the Messages window :
Could not locate executable on path: Primes_Count.o
I don't see why Ada is making such a big deal out of the Run step.
If there is another stage between making the .o file and a finished Ada executable, then surely it is something that the GPS system can take care of itself . . .
December.
OK now, sorted. The GPS panel governing this [ Project menu > Edit Proj Props > Main Files tab ] setting was blacked out until clicked.
Running available now and working well.
it is Project->Properties-> Main Files add your file to run. This will sort out the issue.

Extract the contents of cmd.exe IDE to a text file using autohotkey scripts

I am trying to extract the contents of cmd.exe IDE to a text file using autohotkey scripts ie one test.ahk and its written as shown below:
WinGetText, text, "C:\WINDOWS\system32\cmd.exe"
FileAppend, %text%, C:\ThreePartition\ACTUAL.txt
I am not able to extract the contents. Can anyone please suggest the correct way to do the extraction?
The text retrieved is generally the same as what Window Spy shows for that window.
The Window Spy shows no text elements for CMD windows - what you see is not necessarily what you can get :)
What you can do is to simulate the Select All and Paste commands, and then use the clipboard contents.
I don't believe you can extract the contents of a cmd window without somehow using DllCall to read the process memory directly.
If you just want the output of a CLI command such as Grep or AWK, using stdout via the run command should work. Honestly though, I stopped relying on AHK because this sort of thing is just too clunky.
http://www.autohotkey.com/docs/commands/Run.htm.
Edit for comments:
What you want is doable, but the solution depends entirely on how your IDE works. What behavior does it have that's unique to building a project? If it makes temp files, you can overload your "build" button with an AHK subroutine that watches for the existence of those files, and then checks the modified date of the output executable to see if the build succeeded. The same kind of solution works if the IDE changes its window title when building. Be clever. :)
Failing that, you might have to install a message hook.