Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Launching a QT Script
Forum Updated to NodeBB v4.3 + New Features

Launching a QT Script

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 755 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    David King
    wrote on 7 Jan 2018, 19:12 last edited by
    #1

    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

    A 1 Reply Last reply 7 Jan 2018, 19:22
    0
    • D David King
      7 Jan 2018, 19:12

      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

      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 7 Jan 2018, 19:22 last edited by
      #2

      @David-King

      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.

      Qt has to stay free or it will die.

      D 1 Reply Last reply 7 Jan 2018, 19:53
      0
      • A aha_1980
        7 Jan 2018, 19:22

        @David-King

        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.

        D Offline
        D Offline
        David King
        wrote on 7 Jan 2018, 19:53 last edited by
        #3

        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

        A 1 Reply Last reply 7 Jan 2018, 20:02
        0
        • D David King
          7 Jan 2018, 19:53

          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

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 7 Jan 2018, 20:02 last edited by aha_1980 1 Jul 2018, 20:04
          #4

          @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".

          Qt has to stay free or it will die.

          1 Reply Last reply
          0

          1/4

          7 Jan 2018, 19:12

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved