-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By AXLE
Hello to all =)
I am currently creating some Functions UDFs and examples using DllCall and other methods that interact with MS C runtime and Windows API.
Many of the MSDN documents can be a little ambiguous and more so when converting to an AutoIt3 context, so for correctness or when I can't find conformation from within the forum or other documentation I would like to ask a number of questions with regards to the above topic. Even though some questions may not appear to relate to the same topic, they are all related to the same set of UDFs I am creating.
The main purpose of the Function library is exemplify the use of Dll Calls from within AutoIt3 for other users and obviously a good learning and practice exercise for myself. Some Functions may resemble functions already supplied within the UDF library, and is purely a mater of process and coincidence to have arrived at a similar place. Where a UDF function already exists I will provide an example of the same method using the standard UDF , as the standard AutoIt UDFs will be more appropriate for most Users.
The second purpose is to extend some of the current UDFs relating to AutoIt/Windows Dialog Metrics and Device Context. Although this is intended mostly for my own purposes It will offer a reasonable context for DllCall examples and hopefully a few additional functions that others may benefit from.
Before posting any code or examples I would like to ensure that I am using the correct AutoIt and Win API measurements and methods so I will begin with those questions.
(Mods, I would like to keep future code examples at the top of this thread, but if that is not convenient I can begin another thread. Basic layout top to bottom 1. Code examples with explanations 2.Standards, Measurements and Metrics 3.Questions and general discussions)
For members who may feel that I am an unknown quantity, I am a very happy, easy going person and always approachable for questions or suggestions =)
I do have a lot going on in the background most days between indentured study, Software Dev Startup, assisting local students with fundamental coding and robotics, time with my family etc.
So If I don't reply to a question straight away, its just that I am busy elsewhere with other commitments.
-
By ufukreis1212
Hello, I am new members. Help me please. I want vbs convert to au3 .
This vbs code :
'deneme Set SystemSet = GetObject("winmgmts:").InstancesOf ("Win32_OperatingSystem") strOSArch = GetObject("winmgmts:root\cimv2:Win32_OperatingSystem=@").OSArchitecture Set objNetwork = CreateObject("Wscript.Network") Set wshShell = CreateObject( "WScript.Shell" ) strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) Set oShell = WScript.CreateObject("WScript.Shell") proc_arch = oShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%") Set oEnv = oShell.Environment("SYSTEM") strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colMB = objWMIService.ExecQuery("Select * from Win32_BaseBoard") Set colCSes = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem") Set colProcessors = objWMIService.ExecQuery("Select * from Win32_Processor") Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItemsx = objWMIService.ExecQuery( _ "SELECT * FROM Win32_VideoController",,48) '------------------------------------------------------------------- Set obj = GetObject("winmgmts:").InstancesOf("Win32_PhysicalMemory") i = 1 For Each obj2 In obj memTmp1 = obj2.capacity / 1024 / 1024 TotalRam = TotalRam + memTmp1 i = i +1 Next '-------------------------------------------------------------------- Dim objWMIService : Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery("Select Architecture from Win32_Processor") For Each objItem in colItems if objItem.Architecture = 0 then strArchitecture = "x86" end if if objItem.Architecture = 9 then strArchitecture = "x64" end if next '-------------------------------------------------------------------- strComputer = "." ' Local computer strMemory = "" i = 1 set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory") For Each objItem In colItems if strMemory <> "" then strMemory = strMemory & vbcrlf strMemory = strMemory & "Bank" & i & " : " & (objItem.Capacity /1024 /1024) & " Mb" i = i + 1 Next installedModules = i - 1 Set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray") For Each objItem in colItems totalSlots = objItem.MemoryDevices Next '---------------------------------------------------------------------- Set objWMISvc = GetObject( "winmgmts:\\.\root\cimv2" ) Set colItems = objWMISvc.ExecQuery( "Select * from Win32_ComputerSystem" ) For Each objItem in colItems strComputerDomain = objItem.Domain Next for each System in SystemSet For Each objItem in colItemsx For Each objProcessor in colProcessors For Each bbType In colMB MbVendor = bbType.Manufacturer MbModel = bbType.Product MsgBox "İşletim Sistemi : " & System.Caption & vbNewLine & _ "İşletim Sistemi Versionu : " & + System.Version & vbNewLine & _ "Windows Mimari Yapısı: " & strOSArch & vbNewLine & _ "Kullanıcı isminiz: " & objNetwork.UserName & vbNewLine & _ "Bilgisayar ismi: " & strComputerName & vbNewLine & _ "Çalışma Grubu: " & strComputerDomain & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "Anakart: " & MbVendor & " " & "[" & MbModel & "]" & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "Grafik Kartı: " & objItem.Caption & vbNewLine & _ "Driver Version: " & objItem.DriverVersion & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "İşlemci Üreticisi: " & objProcessor.Manufacturer & vbNewLine & _ "İşlemci İsmi: " & objProcessor.Name & vbNewLine & _ "CPU Mimarisi: " & strArchitecture & vbNewLine & _ "İşlemci Çekirdek sayısı: " & oEnv("NUMBER_OF_PROCESSORS") & vbNewLine & _ "--------------------------------------" & vbNewLine & _ "Toplam RAM: " & TotalRam & " MB" & vbNewLine & _ "Toplam Slot: " & totalSlots & vbNewLine & _ "Boş Slot: " & (totalSlots - installedModules) & vbNewLine & _ "Ramlerin bulunduğu slotlar:" & vbcrlf & strMemory,0,"deneme" Next Next Next Next please help me , thanks.
-
By jdegraff
I'm trying to add a bit of functionality to the FastStone File Rename dialog. I can access every control that I need to except the one that contains the files to be renamed. If I do some exploring in a vbScript shell I get
:c = "TTntTreeView.UnicodeClass1"
:?aut.ControlTreeView(win,"",c,"GetItemCount","","")
5
You can see that the treeview control reports having five items, which is the number displayed. If I manually select (mouse) item #3 I can see the result by
:?aut.ControlTreeView(win,"",c,"GetSelected","1","")
#3
But I do not know how to get the text for the selected item. If "#3" is the item reference then I should be able to
:?aut.ControlTreeView(win,"",c,"GetText","1","#3")
or
:?aut.ControlTreeView(win,"",c,"GetText","1","#3")
if I go strictly by the help file, but it returns nothing.
:?aut.ControlTreeView(win,"",c,"Exists","","3")
1
So it appears that item 3 exists, but
:?aut.ControlTreeView(win,"",c,"GetText","","3")
does not have any text???
:?aut.ControlTreeView(win,"",c,"Exists","","9")
1
and it also appears item 9 exists (it does not)
:?aut.ControlTreeView(win,"",c,"Select","","")
1
causes the first item to be selected, as does
:?aut.ControlTreeView(win,"",c,"Select","","3")
1
Here is the output from the Window Info tool
>>>> Window <<<<
Title: Batch Image Convert / Rename
Class: TBatchConvert
Position: 501, 83
Size: 760, 520
Style: 0x16CD0000
ExStyle: 0x00010100
Handle: 0x0000000001950796
>>>> Control <<<<
Class: TTntTreeView.UnicodeClass
Instance: 1
ClassnameNN: TTntTreeView.UnicodeClass1
Name:
Advanced (Class): [CLASS:TTntTreeView.UnicodeClass; INSTANCE:1]
ID: 37030040
Text:
Position: 354, 79
Size: 378, 188
ControlClick Coords: 108, 86
Style: 0x54010039
ExStyle: 0x00000200
Handle: 0x0000000002350898
>>>> Mouse <<<<
Position: 970, 279
Cursor ID: 0
Color: 0xE1E1E1
>>>> StatusBar <<<<
>>>> ToolsBar <<<<
>>>> Visible Text <<<<
Batch Rename
...
D:\temp\picsave\
Images + Videos (*.jpg;*.jpe;*.jpeg;*.bmp;*.gif;*.tif;*.tiff;*.cur;*.ico;*.png;*.pcx;*.jp2;*.j2k;*.tga;*.ppm;*.wmf;*.psd;*.crw;*.nef;*.cr2;*.orf;*.raf;*.dng;*.mrw;*.pef;*.srf;*.arw;*.rw2;*.x3f;*.sr2;*.srw;*.nrw;*.rwl;*.eps;*.avi;*.mpeg;*.mpg;*.wmv;*.mov;*.mp4;*.mts;*.mkv;*.m4v)
Search and Replace
Use Filename Template
No Sort
Clear
Remove
Add All
Add
Preview
Close
Rename
No Change
?
-
By vyperhand
I'm struggling to launch a VBS file via autoit using RunWait. Due to the nature of the deployment tool I am using for said script, I only know that the .vbs files will be in the same directory as my AutoIt-generated .exe, but not what that path will be. The path will look something like this:
c:\programdata\vendor\lots\of\folders\randomnumber
This is generated during deployment and I have no way of predicting the path - therefore, I am not sure how to call back to "same directory" in order to successfully launch the .vbs.
This line is as close as I have gotten - this fires off the cmd window, but it closes immediately with out information, and the .vbs is not launched.
RunWait (@ComSpec & " /c" & 'cscript.exe WORKPLEASE.vbs ALL /Q /NoCancel') I thought /c might be the problem, but leaving out the /c element causes me not to even see the momentary CMD window flash by. Any help will be greatly appreciated, and thanks in advance.
-
By ur
I am maintaining all the reusable code in a separate file as library.au3.
In that file I have referenced some dependent files using fileinstall, so that they will be extracted when necessary.
Problem is, if I use a function in the library.au3 in another script which doesn't require this dependent file, as I am including the whole file using include tag, it is embedding that file also.
Is there any way to exclude that.
-