Jump to content

Recommended Posts

Posted

i'm doing a program that would read output from the UI of another program. What i want is to completely hide the other program thus i hide its icon tray,its window and its title BUT i need to hide the file name so help me do it so i can run it like this ---->run("TheProgram.dat")

Posted (edited)

Hi once again,

#include <Constants.au3>

Opt("RunErrorsFatal", 0)

$DatFile = "x:\PathToYourDatFile\yourfile.dat"

If FileExists($DatFile) Then
    $Pid = Run(@ComSpec & " /c " & 'assoc .dat', @SystemDir, @SW_HIDE, $STDOUT_CHILD)
    $DatAssoc = StdoutRead($Pid)
    Run(@ComSpec & " /c " & 'assoc .dat=exefile', "", @SW_HIDE)
    Run($DatFile, "", @SW_SHOW)
    Run(@ComSpec & " /c " & 'assoc ' & $DatAssoc, "", @SW_HIDE)
EndIf

Cheers

Edited by smashly
Posted

can i add a tiny miny problem ?-- the program runs and the @sw_hide not working do i did the winwait() and Winsetstate() stuff with a delay 0 millisecond in the OPT() thing, so i need to completely hide it from the view as it's now flashes before hiding

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...