Jump to content

I have 3 questions... Pease help me


Recommended Posts

I is beginner autoit script programmer. Please help me.

I have 3 questions...

1) Question.

Exist problem with this.

#include <ChangeResolution.au3>

On compiling process (SciTE4Autoit3) i get next message:

#include <ChangeResolution.au3>

Error: Error opening the file

I have XP PRO SP2 and AutoIt v3.2.12.1

My code:

#NoTrayIcon

#include <GUIConstants.au3>

#include <ChangeResolution.au3>

;;

;~ Change Screen Parameters

If $CmdLine[1]="ChangeScreenParam" then

$Rezolution=_ChangeScreenRes($CmdLine[2] ,$CmdLine[3] ,$CmdLine[4] ,$CmdLine[5])

FileDelete(@TempDir & "\ScreenParam.at_")

$filepar = FileOpen(@TempDir & "\ScreenParam.at_", 1)

FileWriteLine($filepar, $CmdLine[2])

FileWriteLine($filepar, $CmdLine[3])

FileWriteLine($filepar, $CmdLine[4])

FileWriteLine($filepar, $CmdLine[5])

FileClose($filepar)

EndIf

Exit(@error)

2) Question.

I dont get result for @HomeShare. (I have XP PRO SP2) AutoIt v3.2.12.1 ;~

Get HomeInfo If $CmdLine[1]= GetHomeInfo then FileDelete(@TempDir &

HomeInfo.txt ) $fileHInfo = FileOpen(@TempDir & HomeInfo.txt , 1)

FileWriteLine(@TempDir & HomeInfo.txt , @HomeShare)

FileWriteLine(@TempDir & HomeInfo.txt , @HomeDrive)

FileWriteLine(@TempDir & HomeInfo.txt , @HomePath) FileClose($fileHInfo)

EndIf

3) Question.

;~ This not normal! If number of If is = to number of EndIf - as get ERROR!I have XP PRO SP2,

AutoIt v3.2.12.1;~

;~ InputBox

If $CmdLine[1]="InputBox" then

If Not IsDeclared("sInputBoxAnswer") Then Dim $sInputBoxAnswer

$sInputBoxAnswer = InputBox($CmdLine[2],$CmdLine[3],$CmdLine[4],$CmdLine[5],$CmdLine

[6],$CmdLine[7],$CmdLine[8],$CmdLine[9])

Select

Case @Error = 0 ;OK Button

FileDelete(@TempDir & "\InputBox.at_")

FileWrite(@TempDir & "\InputBox.at_", $sInputBoxAnswer)

Case @Error = 1 ;Cancel Button

Case @Error = 3 ;The InputBox failed to open

EndSelect

endif

endif

Link to comment
Share on other sites

2) Question.

I dont get result for @HomeShare. (I have XP PRO SP2) AutoIt v3.2.12.1 ;~

Get HomeInfo If $CmdLine[1]= GetHomeInfo then FileDelete(@TempDir &

HomeInfo.txt ) $fileHInfo = FileOpen(@TempDir & HomeInfo.txt , 1)

FileWriteLine(@TempDir & HomeInfo.txt , @HomeShare)

FileWriteLine(@TempDir & HomeInfo.txt , @HomeDrive)

FileWriteLine(@TempDir & HomeInfo.txt , @HomePath) FileClose($fileHInfo)

EndIf

What the heck is "GetHomeInfo"? It not a variable or a function call or a comment... :)

Have you looked at the help file? Run the tutorials there? Are you using SciTE4AutoIt3.exe as your editor?

Also, @HomeShare may not be set outside of a domain login context:

ConsoleWrite("Debug: @HomeDrive = " & @HomeDrive & @LF)
ConsoleWrite("Debug: @HomePath = " & @HomePath & @LF)
ConsoleWrite("Debug: @HomeShare = " & @HomeShare & @LF)

Run the code above in SciTE.

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...