Jump to content

work with cmd


Recommended Posts

Excuse if I write not there and with mistakes I don't know the English I write through the translator.

Prompt where it is possible to download cmd library

from doesn't work #include with <cmd.au3>. Thanks in advance</cmd.au3>

Link to comment
Share on other sites

maybe @ComSpec is what you are looking for?

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

maybe @ComSpec is what you are looking for?

I don't know to me it is necessary, that robotala with крипт with this team and me on the first line a mistake in #include <cmd.au3>

script-

#include <CMD.au3>

#include <Inet.au3>

#include <GUIConstantsEx.au3>

#include <GuiIPAddress.au3>

#NoTrayIcon

$getip = _GetIP()

If $getip = 1 Then

MsgBox(0, "Ошибка", "Проверьте подключение к Интернету или выключите брандмауэр. Программа не имеет доступа к Интернету.")

EndIf

$Form1 = GUICreate("IP-Changer", 437, 125, -1, -1)

$Group1 = GUICtrlCreateGroup("", 8, 8, 417, 105)

$IPAddress1 = _GUICtrlIpAddress_Create($Form1, 16, 48, 130, 21)

_GUICtrlIpAddress_Set($IPAddress1, "0.0.0.0")

$Label1 = GUICtrlCreateLabel("ТекущийIP:", 16, 24, 58, 17)

$Button1 = GUICtrlCreateButton("Возобновить", 16, 72, 131, 25, 0)

$Button2 = GUICtrlCreateButton("Получить новое IP", 168, 24, 243, 33, 0)

$Button3 = GUICtrlCreateButton("Текущий IP в буфере обмена", 168, 64, 243, 33, 0)

GUICtrlCreateGroup("", -99, -99, 1, 1)

_GUICtrlIpAddress_Set($IPAddress1, $getip)

GUISetState(@SW_SHOW)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $Button1

$ip = _ip()

MsgBox(0, "Успешно", "IP-адрес успешно обновлен")

Case $Button2

$pw = InputBox("Пароль", "Пожалуйста, введите свой пароль на маршрутизаторе", "0000", "*")

_CMDStart(0)

_CMDWrite('curl http://192.168.2.1/cgi-bin/login.cgi -d "pws=' & $pw & '"')

_CMDWrite('curl http://192.168.2.1/cgi-bin/disconnect.exe')

_CMDWrite('curl http://192.168.2.1/cgi-bin/connect.exe')

_CMDEnd()

GUICtrlSetState($Button1, @SW_DISABLE)

GUICtrlSetData($Button1, "6")

Sleep(1000)

GUICtrlSetData($Button1, "5")

Sleep(1000)

GUICtrlSetData($Button1, "4")

Sleep(1000)

GUICtrlSetData($Button1, "3")

Sleep(1000)

GUICtrlSetData($Button1, "2")

Sleep(1000)

GUICtrlSetData($Button1, "1")

Sleep(1000)

GUICtrlSetState($Button1, @SW_ENABLE)

GUICtrlSetData($Button1, "Возобновить")

Case $Button3

$ip = _GetIP()

If $ip = 1 Then

MsgBox(0, "Ошибка", "Проверьте подключение к Интернету или выключите брандмауэр. Программа не имеет доступа к Интернету.")

EndIf

ClipPut($ip)

EndSwitch

WEnd

Func _ip()

$aktuelleip = _GetIP()

_GUICtrlIpAddress_Set($IPAddress1, $aktuelleip)

EndFunc

Edited by kolosov
Link to comment
Share on other sites

http://autoit.de/index.php?page=Thread&threadID=9272

edit added second link, though not able to read it at work

Edited by nitekram

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

I downloaded cmd script that with it to do 7 I include it doesn't react to be exact.

>"C:Program FilesAutoIt3 (3)SciTE..autoit3.exe" /ErrorStdOut "C:Users1Downloadscmd (1).au3"

>Exit code: 0 Time: 1.545

Edited by kolosov
Link to comment
Share on other sites

you need to changed the name of your download to be exact - cmd.au3 not cmd(1).au3 or you can change the include statement to the new file name

edit spelling

Edited by nitekram

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

The file cmd.au3 is not a script, it's an include file (a UDF file), you can't just run it and expect it to work.

You might want to learn how the language works, before trying to write a script.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

the cmd.au3 is not a script. it is a UDF. therefore it will not run by itself. he is saying that you need to learn some basics before attempting to write a script - lots of information in help file and on forum

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

See if this helps you out.

http://www.autoitscript.com/autoit3/docs/keywords/include.htm

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

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