Потому, что функция _GUICtrlListView_Create() возвращает не ID элемента, а Handle. Навскидку 2 варианта: 1) Создавать элемент ListView стандартной функцией, 2)
Код:
Код: Выделить всё
ControlHide("Test", "", "SysListView321").
Код: Выделить всё
ControlHide("Test", "", "SysListView321")Код: Выделить всё
#include
$s = _SoundOpen ( 'D:\cd\Dwarf.wma' )
$sound = _SoundPlay ( $s, 1 )
MsgBox ( 64, '', $s )
MsgBox ( 64, '', $sound )
. Но если ты найдёшь решение стукни мне. 
Код: Выделить всё
#include
GUICreate("Computer ID system;) created by Senka!;)", 320, 200)
GUICtrlCreateLabel("Input Computer ID", 110, 10)
$okbutton = GUICtrlCreateButton("Ready", 110, 120, 60)
GUISetState(@SW_SHOW)
$nEdit = GUICtrlCreateInput ("inventory no.", -1,3,175,20)
$nEdit = GUICtrlCreateInput ("Everest no.", -1,30,175,20)
While 1
$msg = GUIGetMsg()
Select
Case $msg = $okbutton
MsgBox(0, "11", "You pressed OK!")
Case $msg = $GUI_EVENT_CLOSE
MsgBox(0, "GUI Event", "You clicked CLOSE! Exiting...")
ExitLoop
EndSelect
WEnd
- отобразить данные можно не закрывая программу, просто выводим MsgBox(64, "", FileRead("Data.txt")).
Код: Выделить всё
$Number = 4
$sRead_Doc = FileRead(@ScriptDir & "\My_File.doc")
$aRead_Doc = StringSplit($sRead_Doc, @CRLF)
For $i = 1 To UBound($aRead_Doc)-1
If StringRegExp($aRead_Doc[$i], "\A(" & $Number & ").*$") Then
MsgBox(64, "Found", _
StringFormat("Numer found at the line [%d], and the founded string line is:\n\n%s", $Number, $i, $aRead_Doc[$i]))
EndIf
NextКод: Выделить всё
$File = "s:\Test.txt"
$hOpenFile = FileOpen($File, 2)
FileWrite($hOpenFile, "Test")
FileClose($hOpenFile)
$SetTime = '20060322083528' ; - 2
_FileSetTime($File, $SetTime)
;FileSetTime($File, $SetTime)
$GetTime = FileGetTime($File, 0, 1)
MsgBox(0, "", StringFormat("Set Time: %s \nGet Time: %s", $SetTime, $GetTime))
FileDelete($File)
Func _FileSetTime($strFile, $strTime, $intType = 0)
Local $iY=Number(StringLeft($strTime,4))
Local $iM=Number(StringMid($strTime,5,2))
Local $iD=Number(StringMid($strTime,7,2))
Local $iH=Number(StringMid($strTime,9,2))
Local $iN=Number(StringMid($strTime,11,2))
Local $iS=Number(StringMid($strTime,13))
; DOS-формат для времени
Local $iFatDate = BitShift($iY-1980,-9) + BitShift($iM,-5) + $iD
Local $iFatTime = BitShift($iH,-11) + BitShift($iN,-5) + $iS/2 ; вот тут косячок в хранении секунд
; базовые структуры
Local $FILETIME = DllStructCreate("dword;dword")
Local $SYSTEMTIME = DllStructCreate("ushort;ushort;ushort;ushort;ushort;ushort;ushort;ushort")
; туда-сюда-обратно
Local $ret = DllCall("kernel32.dll", "int", "DosDateTimeToFileTime", "ushort", $iFatDate, "ushort", $iFatTime, "ptr", DllStructGetPtr($FILETIME))
If $ret[0] =0 Then Return SetError(1, 1, False)
$ret = DllCall("kernel32.dll", "int", "FileTimeToSystemTime", "ptr", DllStructGetPtr($FILETIME), "ptr", DllStructGetPtr($SYSTEMTIME))
If $ret[0] =0 Then Return SetError(1, 2, False)
DllStructSetData($SYSTEMTIME,7,$iS) ; пытаемся откорректировать
$ret = DllCall("kernel32.dll", "int", "SystemTimeToFileTime", "ptr", DllStructGetPtr($SYSTEMTIME), "ptr", DllStructGetPtr($FILETIME))
If $ret[0] =0 Then Return SetError(1, 3, False)
; открываем файл
$ret = DllCall("kernel32.dll", "int", "CreateFile", _
"str", $strFile, "dword", 0x100, "dword", 0, "ptr", 0, "dword", 3, "dword", 0, "ptr", 0 )
If $ret[0] =0 Then Return SetError(2, 1, False)
; правим время и закрываем файл
Local $hFile=$ret[0], $aSysTime[3] = [0,0,0]
$aSysTime[$intType]=DllStructGetPtr($FILETIME)
$ret = DllCall("kernel32.dll", "int", "SetFileTime", "int", $hFile, "ptr", $aSysTime[1], "ptr", $aSysTime[2], "ptr", $aSysTime[0])
DllCall("kernel32.dll", "int", "CloseHandle", "int", $hFile)
If $ret[0] =0 Then Return SetError(2, 2, False)
Return True
EndFunc



Код: Выделить всё
Run('Rundll32.exe "' & @SystemDir & '\mshtml.dll",PrintHTML "c:\image.png"', @SystemDir)Код: Выделить всё
Run(@ComSpec & ' /c control userpasswords2', '', @SW_HIDE)Код: Выделить всё
If FileExists("C:\123\*.*") Then Run(@ComSpec & ' /c net send {имя | * | /DOMAIN[:имя] | /USERS} сообщение', '', @SW_HIDE)Код: Выделить всё
_FileOpenPrint("D:\BUF\P1010376.JPG")
While 1
Sleep (100)
WEnd
Func _FileOpenPrint ($sFilePath)
Local $oShellApp = ObjCreate('shell.application')
Local $sPath = StringRegExpReplace($sFilePath, "\\[^\\]+$", "")
If @extended =0 Then $sPath = @WorkingDir
Local $oPath = $oShellApp.Namespace ($sPath), $oItem
For $oItem In $oPath.items
If $oItem.Path = $sFilePath Then
ConsoleWrite($oItem.Path &@CRLF)
$oItem.InvokeVerb('&Печать')
EndIf
Next
EndFunc ; => _FileOpenPrint
; Эта UDF может быть полезна для просмотра поддерживаемых Verbs
Func _FileListVerbs($sFilePath)
Local $oShellApp = ObjCreate('shell.application')
Local $sPath = StringRegExpReplace($sFilePath, "\\[^\\]+$", "")
If @extended =0 Then $sPath = @WorkingDir
Local $oPath = $oShellApp.Namespace ($sPath), $oItem
For $oItem In $oPath.items
If $oItem.path = $sFilePath Then
Local $oVerbs = $oItem.Verbs
For $oVerb In $oVerbs
ConsoleWrite($oVerb.Name &@CRLF)
Next
EndIf
Next
EndFunc ; => _FileListVerbs