Jump to content

Dos Command


Recommended Posts

Hi Guys,

it´s me again. :o

Why doesn´t it work like this?

Func _ipconfig()

Run(@ComSpec & " /c " & "ipconfig /all > " & @ScriptDir & "\ipconfig.txt", "", @SW_HIDE)

EndFunc

So long,

Mega

C:\Programme\AutoIt3\Include\Process.au3 (42) : ==> "Case" statement with no matching "Select" statement.:

Scite tells me, there is a mistake in the process.au3?! B)

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Works for me if I call the function. Perhaps you should post more of your script incase the problem lies elsewhere.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

If you are running the script like from the desktop @ScriptDir will be (c:\Documents and Settings\UserName\Desktop) which the path has spaces and DOS don't like spaces, so try changing the double quots(") for single quouts(') and add the double quots to the path.

Func _ipconfig()

Run(@ComSpec & ' /c ' & 'ipconfig /all > "' & @ScriptDir & '\ipconfig.txt"', '', @SW_HIDE)

EndFunc

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

i get this a lot when using the standard autoit version, use the one from the beta directory if you dont have the beta version download it and give it a shot.

i started to get this when i installed the beta version it changed my process.au3 so if i call that file in any of my scripts i need the beta version to run it.

Link to comment
Share on other sites

  • Developers

Where do you put the #include statement ? (I hope at the very top of the script and not somewhere hidden in your own Select..EndSelect statement ?)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

; Requirement(s): AutoIt Beta v3.1.1.61+

Switch $aPriority[0]

Case 0x00000040

Return 0

Case 0x00004000

Return 1

Case 0x00000020

Return 2

Case 0x00008000

Return 3

Case 0x00000080

Return 4

Case 0x00000100

Return 5

Case Else

SetError(1)

Return -1

EndSwitch

Definitely a Beta only UDF. Looks like care is needed to which standard UDFs are selected for use now.
Link to comment
Share on other sites

Hi,

thank you. I took the latest beta and now it works again. B)

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...