Компьютерный форум OSzone.net  

Компьютерный форум OSzone.net (http://forum.oszone.net/index.php)
-   AutoIt (http://forum.oszone.net/forumdisplay.php?f=103)
-   -   [решено] Аргумент $CmdLineRaw (http://forum.oszone.net/showthread.php?t=323484)

Паразит 04-02-2017 07:21 2708824

Аргумент $CmdLineRaw
 
Почему у меня не получается установить атрибуты для файлов, переданных через аргумент $CmdLineRaw?


Код:

FileSetAttrib($CmdLineRaw, "+R-A", 0)
;MsgBox (0, "title", $CmdLineRaw)


Mike909 04-02-2017 07:37 2708826

Код:

#include <FileConstants.au3>
#include <MsgBoxConstants.au3>


If $CmdLine[0] >1 Then
    Local $File = $CmdLine[1]
    If FileSetAttrib($File, "+R-A", 0) Then
        MsgBox ($MB_SYSTEMMODAL, "Ok", $CmdLineRaw)
    Else
        MsgBox($MB_SYSTEMMODAL, "Error", "Problem setting attributes.")
    EndIf
EndIf

потому, что $CmdLineRaw - это строка типа "myscript.au3 param1", а не массив


Время: 22:36.

Время: 22:36.
© OSzone.net 2001-