Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Need Help Opening Programs [PART 2]
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Fiend-Master




PostPosted: Mon Oct 25, 2004 7:47 pm   Post subject: Need Help Opening Programs [PART 2]

Now, I know how to open files in turing (Woo hoo! im so proud). Is there anyway to open a file, minimized (IE a text file or something)? Its extremely important, and any help would be appreciated.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Oct 25, 2004 7:59 pm   Post subject: (No subject)

look into Sys.Exec() (there are tons of examples around)...

as for minimizing, the program assosiated with the file must accept arguments, such as "someprogram.exe \command"... So you'd actually have to write the file to be opened in another language such as C++
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Fiend-Master




PostPosted: Mon Oct 25, 2004 8:03 pm   Post subject: (No subject)

well i actually need to do it with a .bat file (one i wrote in notepad), and was wondering if you had any idea as to how to go about it. because im not using it to open a minimized program, its merely a .bat that does something in dos.
Tony




PostPosted: Mon Oct 25, 2004 8:11 pm   Post subject: (No subject)

well if the .bat file will be running for a while (most I encounter are quite fast Wink ) you can refocus back on Turing window right after. This will not minimize .bat's execution, but it will be out of the way.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Fiend-Master




PostPosted: Mon Oct 25, 2004 8:18 pm   Post subject: (No subject)

hmm...i see what you mean. i guess i could full screen the turing window, and just constantly Window.SetActive (windowname) right? So with a bat file, there is no way to minimize? well at least an easy way.
Delos




PostPosted: Tue Oct 26, 2004 6:13 pm   Post subject: (No subject)

Prepare to thank me!

Ok, this took a bit of searching around...but it's quite a clever solution. Please note that this ONLY works on WinXP. If you are running on anything else, then you'll have to figure something else out - possibly on the same lines!

If you're doing this in a batch file, then:
- start of in the root directory
- move to windows
- move to system (not system32!)
- run the programme "Showde~1.scf"(call its name)
- (return to root...)

In Turing:

code:

var str : string := "C:/windows/system/Showde~1.scf"
put str
if not Sys.Exec (str) then
    put "Error"
end if


Now for the catch...for some odd reason, I have no idea why, but the programme will, if you have a Firewall, ask to access the Net. I'm not positive if it won't work if you don't let it through, but it seems to work best when let through.

Anyhow, that's my bit, hope it helped.
Fiend-Master




PostPosted: Wed Oct 27, 2004 9:21 am   Post subject: (No subject)

OH! The show desktop!!! i see what you did! you ran the show desktop application! GENIUS! lol so if i can get the proggy to run the show desktop application, then it will...show the desktop! and all i will need to do is refocus the mainwindow to be shown...THANKS a million!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: