Author Topic: opening, then running a program using hypernext  (Read 3185 times)

VuLMz

  • Newbie
  • *
  • Posts: 4
opening, then running a program using hypernext
« on: February 16, 2011, 08:36:12 AM »
okay, this script should open internet explorer on my computer

Local fname,fhandle,fdetails,ftypes, fpaths,fnames,fextens

  @ set the filename of the program to launch
  Put 'C:Program FilesInternet Exploreriexplore.exe' into fname

  @ Get the file handle
  FolderItemGetAbs(fname,fhandle,fdetails,ftypes, fpaths,fnames,fextens)

  @ Launch the application in the foreground
  FolderItemLaunch fhandle,1


just using that as an example [got that code from another thread thanks]

say i wanted to make a program that i can press a button, and it opens up my defrag, then presses the button to defrag my computer, is this possible
« Last Edit: January 01, 1970, 12:00:00 AM by Guest »

Malkom

  • Administrator
  • Newbie
  • *****
  • Posts: 422
  • Here to help you
Re: opening, then running a program using hypernext
« Reply #1 on: February 17, 2011, 07:38:02 PM »
Quote from: "VuLMz"
okay, this script should open internet explorer on my computer

Local fname,fhandle,fdetails,ftypes, fpaths,fnames,fextens

  @ set the filename of the program to launch
  Put 'C:Program FilesInternet Exploreriexplore.exe' into fname

  @ Get the file handle
  FolderItemGetAbs(fname,fhandle,fdetails,ftypes, fpaths,fnames,fextens)

  @ Launch the application in the foreground
  FolderItemLaunch fhandle,1


just using that as an example [got that code from another thread thanks]

say i wanted to make a program that i can press a button, and it opens up my defrag, then presses the button to defrag my computer, is this possible

As shown above It is easy to launch an exe on the Windows platform but HyperNext cannot pass a parameter to that program to tell it what function to carry out :(

The only other way is to use the mouse movement commands and get Hypernext to click on the relevant button in your target program - not really practical for most operations - unless you are writing a poker bot or similar.
« Last Edit: January 01, 1970, 12:00:00 AM by Guest »
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

 

anything