Sign in to follow this  
Followers 0
Rob781

Run and shell execute commands for DOS shell not working

5 posts in this topic

#1 ·  Posted (edited)

Im haveing problems with the runwait command.. I'm trying to get a DOS program to work.. I works fine when I open cmd.exe in start menu then type in command for it to run in command prompt. But when I try to open it in RunWait("C:Gamesgame.exe /vga") it doesnt show up. I see it in task manger but no windows for it. I even tryed @SW_MAXIMIZE to see if that helps. still no change.. I still see it loaded up in task manger and its running with 20% cpu.. and I hear the music but no window..

I noteced that when I open it up from command prompt, I saw it like close the window and reopen another window or like it resized the window.. I can get it to work from a batch file but not from autoIT..

anyone with any Ideas??? I spent like 3 hours on it and came up with nothing.. all I can think of is a thing that will open cmd.exe and write "C:Gamesgame.exe /vga" directly to it.. but I can find out how to do that

I even tryed ShellExecuteWait("C:Gamesgame.exe /vga") an it just errored and didn't like the spacing in some of the switches in side of the "" for the command

Edited by Rob781

Share this post


Link to post
Share on other sites



anyone with any Ideas??? I spent like 3 hours on it and came up with nothing.. all I can think of is a thing that will open cmd.exe and write "C:Gamesgame.exe /vga" directly to it.. but I can find out how to do that

I even tryed ShellExecuteWait("C:Gamesgame.exe /vga") an it just errored and didn't like the spacing in some of the switches in side of the "" for the command

Have you looked at the helpfile in those 3 hours? ShellExecuteWait() should have the commandline parameters in a separate parameter.

...but, have you read our forumrules, because looking at your commandline you are telling us you are staring a game?

Jos

.


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

"parameters [optional] Any parameters for the program. Blank ("") uses none." I couldn't find anything about how to set up parameter.. I did a index search for it in help and it poped up with every thing that has parameters.. nothing about the diffrent parameters options.. I even tryied google "autoIT parameters" and came up with a bunch of stuff on how to complie autoit files.. I some one can piont me in the right direction on how to . That would help me. Sorry sorta new to autoIT but starting picking it up..

[autoit]$var1 = " /vga"

ShellExecuteWait(" C:gamesgame.exe " & $var1, "", @ScriptDir, "open")[autoit]

then I run it I get a massage saying windows cannot find 'C:gamesgame.exe /vga' Make sure you typed it correctly.. if I goto cmd in windows and type it in command prompt it loads no problem.

when I run

RunWait("C:gamesgame.exe " & $var1)

it shows up as a precess at 20% cpu and is nunning but nothing under applications the the gui I make.. even kill the gui I made and that screen closes but only thing I can do to stop the game is to stop the process.. the game is still running until I kill the process..

Edited by Rob781

Share this post


Link to post
Share on other sites

but, have you read our forumrules, because looking at your commandline you are telling us you are staring a game?

I don't under stand you what you are talking about "forumrules" should I post is in an anoth section? this looks to me like a gerneral form section. If I should post it else where let me know

Share this post


Link to post
Share on other sites

Rob781,

It is not "where" you are posting that is the problem - Jos was referrring to "what" you are posting. ;)

I suggest you take a look at the Forum rules - particularly the bit about not discussing game interaction - and then you will understand why this thread is now locked. :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0