Launching a QT Script
-
May I ask another newcomer question ?
I've come to Qt by way of a vendor tool, that uses Qt Script for automating tests etc
The tool ships with several examples, each of which comprise just 2 files:
A .ui file, and a .js file
Per vendor advice, I've been using Qt Creator, to edit examples, into what we need
But each time I want to run the example, I have to go back to the vendor tool, to launch the .js file
The .js file in turn, includes a line that loads the .ui file, via a vendor-special command
Indeed, the vendor includes many special comms-related commands, to access their comms functionality
Anyway, going back to the vendor tool, to launch the .js file, requires about 10 keystrokes/clicks
So is a bit of a timesoak, each try I want to check something
I wondered, is it possible, from within Qt Creator, to launch the .js file ?
I've tried Debug > Start Debugging and the various options there, but not luck
Reading the Qt Documentation seemed to suggest I need a project container that 'hosts' the .js/.ui QT Script,
to be able to launch the .js
But if so, I'm a bit lost, on how I go about that
And want to avoid pursuing that, if there's infact an easy way -
there may be multiple options.
if you can run the vendors program from command line, you could set up an External Tool. it may also be possible to add a Run Configuration to your project that calls that tool.
-
Hi,
Many thanks there for your reply, much appreciated
Hmm, I've just tried launching the tool from a command prompt, with /? or -? or foo.js as single command-line parameter. But it just launches the tool as normal. The tool is a Windows application.
So looks like the tool lacks command-line support. There's no mention of such support in the tool help or manual.
The tool does have a script autorun facility. But that's only on comms connect, so no good for offline running of a .js. And the facility looks to be unimplemented anyway.
So unfortunately, doesn't look to be much mileage with command-line launching..
Many thanks,
David
-
@David-King Well, you can still ask the vendor for an extension of his software.
from your description it doesn't sound as you could run the JS file without his tool.
But you could use some scripting automation tools like AutoHotkey - don't know if that would be to "hacky".