Jump to content

@Comspec help


Recommended Posts

I have a number of lines that i need to run in cmd but i have no idea how to use comspec, could someone conver these .bat codes to autoit ?

1.

cd /d "C:\Program Files (x86)\Silkroad\ScreenShot"

ren *.jpg *.bak

2.

@echo off

cd /d "%~dp0decode"

for %%f in ("C:\Program Files (x86)\Silkroad\ScreenShot\*.jpg") do java -cp decode.jar captcha.Main "%%~f" "%~dp0code.txt"

cd /d "%~dp0"

type code.txt

thanx in advance ^_^

Link to comment
Share on other sites

  • Developers

You can write this in native AutoIt3 syntax. just open the helpfile and look for the proper functions.

Jos

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

  • Developers

No offence jos but that did not help at all. I NEED them to run at comspec level and have no idea how to use @COMSPEC.

No offence back, but then just simply put it in a batch file and use Run() or ShellExecute() to run the batch file.

There are a zillion examples in these forums on how to run something with @comspec ^_^

Edited by Jos

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

  • Developers

These should do it:

FileChangeDir()
FileFindFirstFile()
While 1
    FileFindNextFile()
    If @error then ExitLoop
    RunWait( java......)
Wend
FileChangeDir()
ShellExecute(logfile)

Jos ^_^

Edited by Jos

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

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...