Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/27/2015 in all areas

  1. UEZ

    String to icon

    Use $__g_hGDIPDll or even better use _GDIPlus_HICONCreateFromBitmap instead.
    1 point
  2. What have you tried so far? Have you looked for examples on this site yet? There are numerous examples of people doing exactly what you're asking, seek and ye shall find.
    1 point
  3. Short report. For system info. With memowrite function. Main_OSI() Func Main_OSI() Global $sMessage, $mtText $mtText='OperateSystemInfo' $nCPU=RegRead('HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0', 'ProcessorNameString') $nOS=RegRead('HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'ProductName') $ServicePack=RegRead('HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'CSDVersion') $tHarddisk=DriveSpaceTotal('C:') ;OperateVar $fHarddisk=DriveSpaceFree('C:') $tMemory=MemGetStats() $fMemory=MemGetStats() MemoWrite('CPU: '&$nCPU&@CR& _ 'OS: '&$nOS&' '&$ServicePack&@CRLF& _ 'HDD(C): '&Round($tHarddisk/1024)& _ ' G FREE: '&Round($fHarddisk/1024)& _ ;MemoWrite Table. ' G'&@CRLF& _ 'MEM: '&Round($tMemory[1]/1024)& _ ' MB FREE: '&Round($fMemory[2]/1024)& _ ' MB') EndFunc ;==>OperateSystemInfo. Func MemoWrite($sMessage="") MsgBox(64, $mtText, $sMessage) ;MemoWrite Message. EndFunc ;==>Memomessage. Graphic User Interfade. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $mtText='OperateSystemInfo' $nCPU=RegRead('HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0', 'ProcessorNameString') $nOS=RegRead('HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'ProductName') $ServicePack=RegRead('HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'CSDVersion') $tHarddisk=DriveSpaceTotal('C:') ;OperateVar $fHarddisk=DriveSpaceFree('C:') $tMemory=MemGetStats() $fMemory=MemGetStats() $Form1 = GUICreate($mtText, 307, 122, -1, -1, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS)) GUISetIcon("C:\WINDOWS\system32\winfxdocobj.exe") $Button1 = GUICtrlCreateButton("OK", 104, 85, 88, 25, $WS_GROUP) GUICtrlSetFont(-1, 10, 400, 0, "Tahoma") $Icon1 = GUICtrlCreateIcon("C:\WINDOWS\system32\ahui.exe", -1, 12, 12, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP)) $Label1 = GUICtrlCreateLabel("CPU: "&$nCPU, 64, 10, 300, 17) $Label2 = GUICtrlCreateLabel("OS: "&$nOS&' '&$ServicePack, 64, 26, 300, 17) $Label3 = GUICtrlCreateLabel("HDD(C): "&Round($tHarddisk/1024)&' G FREE: '&Round($fHarddisk/1024)&" G", 64, 42, 300, 17) $Label4 = GUICtrlCreateLabel("MEM: "&Round($tMemory[1]/1024)&' MB FREE: '&Round($fMemory[2]/1024)&' MB', 64, 58, 300, 17) GUISetState(@SW_SHOW) Do $msg=GUIGetMsg() Switch $msg Case -3 Exit Case $Button1 ExitLoop EndSwitch Until False OR ADD MemGetStats #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ProgressConstants.au3> $mtText='OperateSystemInfo' $nCPU=RegRead('HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0', 'ProcessorNameString') $nOS=RegRead('HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'ProductName') $ServicePack=RegRead('HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'CSDVersion') $tHarddisk=DriveSpaceTotal('C:') ;OperateVar $fHarddisk=DriveSpaceFree('C:') $tMemory=MemGetStats() $Form1 = GUICreate($mtText, 307, 135, -1, -1, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS), BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE)) GUISetIcon("C:\WINDOWS\system32\winfxdocobj.exe") $Button1 = GUICtrlCreateButton("OK", 104, 100, 88, 25, $WS_GROUP) GUICtrlSetFont(-1, 10, 400, 0, "Tahoma") $Icon1 = GUICtrlCreateIcon("C:\WINDOWS\system32\ahui.exe", -1, 12, 12, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP)) $Label1 = GUICtrlCreateLabel("CPU: "&$nCPU, 64, 10, 300, 17) $Label2 = GUICtrlCreateLabel("OS: "&$nOS&' '&$ServicePack, 64, 26, 300, 17) $Label3 = GUICtrlCreateLabel("HDD(C): "&Round($tHarddisk/1024)&' G FREE: '&Round($fHarddisk/1024)&" G", 64, 42, 300, 17) $Label4 = GUICtrlCreateLabel("RAM: "&Round($tMemory[1]/1024)&' MB', 64, 58, 300, 17) $Label5 = GUICtrlCreateLabel("FREE: "&Round($tMemory[2]/1024)&' MB', 141, 58, 75, 17) $Label6 = GUICtrlCreateLabel($tMemory[0]&'%', 200, 74, 30, 17) $Label7 = GUICtrlCreateLabel('LOAD:', 65, 74, 75, 17) $Progress1 = GUICtrlCreateProgress(100, 76, 95, 12) GUICtrlSetData(-1, $tMemory[0]) GUISetState(@SW_SHOW) $begin = TimerInit() AdlibRegister("_Timer", 250) Do $msg=GUIGetMsg() Switch $msg Case -3 Exit Case $Button1 ExitLoop EndSwitch Until False Func _Timer() $fMemory=MemGetStats() $rMemory = Round($fMemory[2]/1024) $lMemory = $fMemory[0] If TimerDiff($begin)>1000 Then ControlSetText($mtText, "", $Label5, StringFormat('FREE: '&$rMemory&' MB', '%d')) ControlSetText($mtText, "", $Label6, StringFormat($lMemory&'%', '%d')) GUICtrlSetData($Progress1, $lMemory) $begin = TimerInit() EndIf EndFunc Last post. I stoped post this forum. Move go to other forum.
    1 point
  4. I think the problem is caused by PRN being a reserved name as descrihed here.
    1 point
  5. There does seem to be a bug here or at least unexpected behaviour related to files name PRN It does not seem to matter what the extention is. FileExists() is probable detecting the printer port PRN ;File and path do not exist $FolderA = "C:\ThisPathDoesNotExist\PRN.txt" $Exists = FileExists($FolderA) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $Exists = ' & $Exists & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console ;File and path do not exist $FolderB = "C:\ThisPathDoesNotExist\ABC.txt" $Exists = FileExists($FolderB) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $Exists = ' & $Exists & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console ;Path exist but file does not exist $FolderA = "C:\Temp\PRN.txt" $Exists = FileExists($FolderA) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $Exists = ' & $Exists & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console ;Path exist but file does not exist $FolderB = "C:\Temp\ABC.txt" $Exists = FileExists($FolderB) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $Exists = ' & $Exists & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console EDIT: It also detects COM1.txt COM2.txt etc.
    1 point
  6. Use /k instead of /c
    1 point
  7. wakillon

    PostStampBuilder

    I got it ! Windows Paint do not support transparency. The Main problem was my wife !!! She never update his photo editor ! Once updated it works ! 1000 excuses for lost time ! Thank you very much !
    1 point
  8. UEZ

    PostStampBuilder

    Ok, it seems that internally 32-bit is used although screen color depth is set to 16-bit (WMI still reports 32-bit) and it is displayed in 16-bit color format. "No woman - no cry"
    1 point
  9. wakillon

    PostStampBuilder

    May be because it's my wife's Laptop !
    1 point
  10. MemGetStats ()
    1 point
×
×
  • Create New...