HyperNext Studio

HyperNext Studio => General => Topic started by: VuLMz on February 16, 2011, 08:36:12 AM

Title: opening, then running a program using hypernext
Post by: VuLMz 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
Title: Re: opening, then running a program using hypernext
Post by: Malkom 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.