Beiträge von Greenhorn
-
-
Vielleicht solltest Du bei devcon dafür sorgen, das die Zeichenkette, die Du übergibst Anführungszeichen enthält.
[autoit]$PCI_VEN = '"PCI\VEN_11AB&DEV_4364&SUBSYS_81F81043&REV_12\4&20515DB1&0&00E5"'
[/autoit]ZitatMatthias Göbel <nospam at email.com> schrieb:
>> devcon enable *VID_057C*PID_5601*
> Anscheinend stört das "&" !
Die letzte Variante solltest Du nehmen, sonst könnte es zu
"Missverständnissen" kommen und mehr dis/en-abled werden, als gewollt.
Evt. geht's auch mit Gänsefüßchen:
devcon enable "*VID_057C&PID_5601*"--
Gruß
RalfZitatJa, mit "" gehts auch.
Das "&" ist in der cmd shell ein "Sonderzeichen".
Vielen Dank.
--
Matthias GöbelGruß
Greenhorn -
Moin,
warum und wo möchtest/musst Du die Bitmap so oft hintereinander zeichnen ?
Wenn es immer die gleiche Bitmap ist kannst Du sie in ein DIB (Geräteunhabhängiges Bitmap) umwandeln, damit lässt sich für gewöhnlich schneller arbeiten.
Sieh dir mal die DIB Funktionen und Beispiele in der MSDN an.
CreateBIBSection
CreateDIBitmap
GetBitmapBits
SetBitmapBitsEDIT:
GetDIBits() gibt einen int zurück und kein Bitmaphandle !Gruß
Greenhornp.s. Warum sind 6 % CPU Auslastung zuviel ???
-
Moin Tweaky und frohe Wiehnacht,
vielleicht hilft dir folgender Link weiter http://forum.enteo.com/showthread.php?t=376 ...
... ist als gelöst markiert, also ...

Gruß
Greenhorn -
Moin Spider,
ich bin im Moment ohne AutoIt zu Fuß, aber ändere deine vStructBitmap160x... wie folgt ab:
[autoit]
[/autoit][autoit][/autoit][autoit]
$tag_lgLcdBitmapHeader = 'dword Format;'
$tag_lgLcdBitmap160x43x1 = $tag_lgLcdBitmapHeader & 'byte pixels['& $LGLCD_BMP_WIDTH*$LGLCD_BMP_HEIGHT&'];'$st_lgLcdBitmap160x43x1 = DllStructCreate ($tag_lgLcdBitmap160x43x1)
[/autoit]Codetypedef struct { DWORD Format; } lgLcdBitmapHeader; typedef struct { lgLcdBitmapHeader hdr; // Dieses Strukturmitglied besteht aus dem Datentyp lgLcdBitmapHeader, kein Zeiger auf diesen. BYTE pixels[LGLCD_BMP_WIDTH*LGLCD_BMP_HEIGHT]; } lgLcdBitmap160x43x1;
EDIT
Noch was gefunden, wenn ich mich nicht irre ...Spoiler anzeigen
[autoit]$tag_lgLcdBitmapHeader = 'dword Format;'
[/autoit] [autoit][/autoit] [autoit]
$tag_lgLcdBitmap160x43x1 = $tag_lgLcdBitmapHeader & 'byte pixels['& $LGLCD_BMP_WIDTH*$LGLCD_BMP_HEIGHT&'];'$st_lgLcdBitmap160x43x1 = DllStructCreate ($tag_lgLcdBitmap160x43x1)
[/autoit] [autoit][/autoit] [autoit]DllStructSetData ($vStructBitmap160x43x1, 'Format', $LGLCD_BMP_FORMAT_160x43x1)
[/autoit] [autoit][/autoit] [autoit]For $Y = 0 To 42
[/autoit]
For $X = 1 To 160
DllStructSetData ($vStructBitmap160x43x1, 'pixels', _
_Iif(Mod($X+$Y,2) = 0,255,0), ($Y * 160) + $X)
Next
NextGruß
Greenhorn -
Hm, Du könntest dir das VB-Skript übersetzen und es damit versuchen ...
[autoit]
[/autoit]
; Laufwerksbuchstabe D: auf Q: ändern
$strComputer = "."
Set $objWMIService = GetObject("winmgmts:\\" & $strComputer & "\root\cimv2")
Set $colVolumes = $objWMIService.ExecQuery _
("Select * from Win32_Volume Where Name = 'D:\\'")
For Each $objVolume in $colVolumes
$objVolume.DriveLetter = "Q:"
$objVolume.Put_
Next
... ich habe im Moment kein AutoIt am Start und mit WMI wenig am Hut gehabt, sorry.Gruß
Greenhorn -
Moin,
Du kannst das Tool von Uwe Siebert dafür benutzen ...
http://www.uwe-sieber.de/files/remount.zip
oder
Start -> Ausführen -> cmd -> diskpart -hFrohe Wiehnacht !
Greenhorn -
Moin Spider,
ich habe da ein Bsp. in C++ gefunden. Wenn Du Probleme beim Übersetzen hast kann ich dir helfen ...
Spoiler anzeigen
C
Alles anzeigen// wmi_test.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung. // #include "stdafx.h" #define _WIN32_DCOM #include <iostream> using namespace std; #include <comdef.h> #include <Wbemidl.h> # pragma comment(lib, "wbemuuid.lib") int doit() { HRESULT hres; // Step 1: -------------------------------------------------- // Initialize COM. ------------------------------------------ hres = CoInitializeEx(0, COINIT_MULTITHREADED); if (FAILED(hres)) { cout << "Failed to initialize COM library. Error code = 0x" << hex << hres << endl; return 1; // Program has failed. } // Step 2: -------------------------------------------------- // Set general COM security levels -------------------------- // Note: If you are using Windows 2000, you need to specify - // the default authentication credentials for a user by using // a SOLE_AUTHENTICATION_LIST structure in the pAuthList ---- // parameter of CoInitializeSecurity ------------------------ hres = CoInitializeSecurity( NULL, -1, // COM authentication NULL, // Authentication services NULL, // Reserved RPC_C_AUTHN_LEVEL_DEFAULT, // Default authentication RPC_C_IMP_LEVEL_IMPERSONATE, // Default Impersonation NULL, // Authentication info EOAC_NONE, // Additional capabilities NULL // Reserved ); if (FAILED(hres)) { cout << "Failed to initialize security. Error code = 0x" << hex << hres << endl; CoUninitialize(); return 1; // Program has failed. } // Step 3: --------------------------------------------------- // Obtain the initial locator to WMI ------------------------- IWbemLocator *pLoc = NULL; hres = CoCreateInstance( CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID *) &pLoc); if (FAILED(hres)) { cout << "Failed to create IWbemLocator object." << " Err code = 0x" << hex << hres << endl; CoUninitialize(); return 1; // Program has failed. } // Step 4: ----------------------------------------------------- // Connect to WMI through the IWbemLocator::ConnectServer method IWbemServices *pSvc = NULL; // Connect to the root\cimv2 namespace with // the current user and obtain pointer pSvc // to make IWbemServices calls. hres = pLoc->ConnectServer( _bstr_t(L"ROOT\\CIMV2"), // Object path of WMI namespace NULL, // User name. NULL = current user NULL, // User password. NULL = current 0, // Locale. NULL indicates current NULL, // Security flags. 0, // Authority (e.g. Kerberos) 0, // Context object &pSvc // pointer to IWbemServices proxy ); if (FAILED(hres)) { cout << "Could not connect. Error code = 0x" << hex << hres << endl; pLoc->Release(); CoUninitialize(); return 1; // Program has failed. } cout << "Connected to ROOT\\CIMV2 WMI namespace" << endl; // Step 5: -------------------------------------------------- // Set security levels on the proxy ------------------------- hres = CoSetProxyBlanket( pSvc, // Indicates the proxy to set RPC_C_AUTHN_WINNT, // RPC_C_AUTHN_xxx RPC_C_AUTHZ_NONE, // RPC_C_AUTHZ_xxx NULL, // Server principal name RPC_C_AUTHN_LEVEL_CALL, // RPC_C_AUTHN_LEVEL_xxx RPC_C_IMP_LEVEL_IMPERSONATE, // RPC_C_IMP_LEVEL_xxx NULL, // client identity EOAC_NONE // proxy capabilities ); if (FAILED(hres)) { cout << "Could not set proxy blanket. Error code = 0x" << hex << hres << endl; pSvc->Release(); pLoc->Release(); CoUninitialize(); return 1; // Program has failed. } // Step 6: -------------------------------------------------- // Use the IWbemServices pointer to make requests of WMI ---- // For example, get the name of the operating system IEnumWbemClassObject* pEnumerator = NULL; IWbemClassObject *pclsObj; int i; while(1) { i=1; hres = pSvc->ExecQuery( bstr_t("WQL"), bstr_t("SELECT * FROM Win32_PerfFormattedData_PerfOS_Processor"), WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &pEnumerator); if (FAILED(hres)) { cout << "Query for operating system name failed." << " Error code = 0x" << hex << hres << endl; pSvc->Release(); pLoc->Release(); CoUninitialize(); return 1; // Program has failed. } // Step 7: ------------------------------------------------- // Get the data from the query in step 6 ------------------- ULONG uReturn = 0; while (pEnumerator) { HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1, &pclsObj, &uReturn); if(0 == uReturn) { break; } VARIANT vtProp; // Get the value of the Name property //hr = pclsObj->Get(L"Name", 0, &vtProp, 0, 0); hr = pclsObj->Get(L"PercentProcessorTime", 0, &vtProp, 0, 0); wcout << " CPU Usage of CPU " << i << " : " << vtProp.bstrVal << endl; VariantClear(&vtProp); //IMPORTANT!! pclsObj->Release(); i++; } } // Cleanup // ======== pSvc->Release(); pLoc->Release(); pEnumerator->Release(); pclsObj->Release(); CoUninitialize(); return 0; // Program successfully completed. } int main(int argc, char **argv) { doit(); Sleep(10000); }LG
Greenhorn -
Moin,
wie die Fehlerausgabe schon sagt, ist kein Array vorhanden oder es ist fehlerhaft.
Prüfe noch einmal deinen StringSplit() ...

LG
Greenhorn -
-
-
Ich hatte ein ähnliches Problem mit den Input-Elementen und habe das mit Hilfe von _WinAPI_SetSysColors (nochmal Danke an BugFix) gelöst:
Wenn ihr die Systemfarben ändert, wirkt sich das auf das gesamte System aus !!! (Daher auch "Systemfarben")
D.h. alle anderen Anwendungen werden genauso aussehen.
Diesen Weg sollte man nicht wählen !LG
Greenhorn -
-
-
-
Moin,
sieh dir mal _FileWriteToLine () an ...

Die Funktion macht es aber auch über Arrays ... ;);)LG
Greenhorn -
also so weit ich das weiß geht das net
Doch, Du kannst dein Bitmap/Icon mit ResHacker den Ressourcen hinzufügen und es dann zur Laufzeit von dort in den Speicher laden.
Hiermit kannst Du dann darauf zugreifen ...Jedoch gilt es zu beachten, das die GDI-Objekte, die Du im Speicher hast auch wieder freigegeben werden, wenn Du sie nicht mehr brauchst, also spätestens bei Programm/Skriptende !
Sieh dir dazu mal _WinAPI_DeleteObject () und _WinAPI_DestroyIcon () anLG
Greenhorn -
Ich glaube, ich bekomme gar nichts mehr mit ...

Auch dir, funkey, herzlichste Glückwünsche zum Geburtstag !!!
LG
Greenhorn -
Ups, da hab ich wohl wieder etwas verschlafen ...

Herzlichen Glückwunsch nachträglich zum Geburtstag !!!
Alles Gute, viel Spaß und Erfolg im neuen Lebensjahr !
LG
Greenhorn -
Das kannst Du nur über die Registry machen oder Du versuchst die shell32.dll zu hacken und die Icons auszutauschen, sollte sich dein Windows aber drüber beschweren.
Also sie dir mal mit RegEdit den Hive HKCR an, dort kannst Du die Icons, die im Explorer dargestellt werden ändern.
Unterschlüssel DefaultIcon ...
LG
Greenhorn