Jump to content

Search the Community

Showing results for tags 'vbscript'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






Found 22 results

  1. DLLCalls using VBScripts Out if the box it is not possible to do DllCalls from VBScripts. But thanks to the +20 year COM Library called DynaWrap this is still possible Anyhow the process of calling Win API functions need some basic knowledge and understanding on how to do this. More specifically the input Data Types parameters used and Calling Formats are key here, as well as the Return Data Types DynaWrap COM Library Keep in mind that this COM Library is a 32Bit only library. Which means that you need to register is using the SysWOW64 regsvr32 But to overco
  2. $VBS = ObjCreate("ScriptControl") $VBS.language = "VBScript" Global Const $Nothing = $VBS.eval("Nothing") $VBS = $Nothing Can someone say me what i'm doing wrong here? ERROR: "test.au3" (2) : ==> Variable must be of type "Object".: $VBS.language = "VBScript" $VBS^ ERROR ->19:22:34 AutoIt3.exe ended.rc:1 >Exit code: 1 Time: 0.462 Thanks. TheAutomator.
  3. 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.ExpandEnvironme
  4. 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 se
  5. 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
  6. 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.
  7. I recently tried to use ControlClick method to send a mouse click command to a button in a application, but I noticed that it is not working when I give first parameter as a window handle (HWND). But, when I give class name or window title, it works fine. I used AutoItX3 and VBScript. Following are the commands I tried in VBScript: Dim WINAPI: Set WINAPI = WScript.CreateObject("WinAPIWrapper.WINAPI") Dim AutoItX3: Set AutoItX3 = WScript.CreateObject("AutoItX3.Control") Dim WindowHandle: WindowHandle = WINAPI.WinAPI_FindWindow("my window title", &quo
  8. i have a vbscript that called an autoit exe file and autoit exe file will return value to vbscript. vbscriptto call the exe and create array: Set objShell = CreateObject("WScript.Shell") objShell.Run ( "C:\Datalog\test.exe") Dim intCtr: intCtr=-1 Dim tempArr() Set UID = CreateObject("System.Collections.ArrayList") CurLot = "" For Each filelog in FileList LogFile = Split(filelog, "~")(1) Set otf = fso.OpenTextFile("C:\Datalog\" & LogFile, 1) intCtr=intCtr+1 sFile = Split(LogFile, "_&qu
  9. Hello Trying to add below code in my main script but this is not functioning can you advise what else i need to do? Dim fn As String Const myDir As String = "C:\AR\" '<- alter here Const newFolder As String = "C:\AR1\" '<- alter here fn = Dir(myDir & "AR_*.xlsm") Do While fn <> "" FileCopy myDir & fn, newFolder & Replace(fn, "AR", "AI") fn = Dir Loop
  10. Is there any change that I can return a code for success or not success in my script? I have a script that look in a SQL db and write to the registry. I want to return some kind of a control, because I will call my script *.exe from VBScript. _Main() Func _Main() Local $sConnectionString = 'DRIVER={' & $sDriver & '};SERVER=' & $sServer & ';DATABASE=' & $sDatabase & ';UID=' & $sUser & ';PWD=' & $sPassword & ';', $sQUERY, $oRecordset, $aRecordsetArray, $aRecordset_inner Local $oConnectio
  11. how do i get the crash report of any application and any running script?????
  12. respected sir, how could I calculate the time difference using auto IT function ?
  13. Who could help me to convert this vbs to AuoIT? on error resume next dim oCPAppletMgr 'Control Applet manager object. dim oClientAction 'Individual client action. dim oClientActions 'A collection of client actions. 'Get the Control Panel manager object. set oCPAppletMgr=CreateObject("CPApplet.CPAppletMgr") if err.number <> 0 then Wscript.echo "Couldn't create control panel application manager" WScript.Quit end if 'Get a collection of actions. set oClientActions=oCPAppletMgr.GetClientActions if err.number<>0
  14. I am trying to use pixel search using VBA but it is returning Bad DLL calling convention error. I don't know where this is going wrong Hoping that you may be able to help. Here's my code: Public Function PixelSearch(lX1 As Long, lY1 As Long, lX2 As Long, lY2 As Long, lColor As Long, Optional lVariations As Long = 0, Optional lStep As Long = 1) As String Dim Rect As LPRECT, szResult As String, pos As Integer 'szResult = String(255, vbNullChar) Rect.X = lX1 Rect.Y = lY1 Rect.Width = lX2 Rect.Height = lY2 'Private Declare Sub AU3_PixelSearch Lib "AutoItX3.dll&
  15. This is a script I did ages go to fix problems when you have a lot of DPs on ConfigMgr 2012 and some of the packages are in a stuck or failed state. It's a massive pain to try and fix it manually. ' **************************************************************************** ' ' Purpose: Checks all packages assigned to a DP and redistributes any with errors. ' ' Usage: cscript.exe CM2012_DP_Redist.vbs ' ' Version: 1.0.0 ' ' History: ' 1.0.0 20-Nov-2013 - Jonathan Bennett ' First version. ' ' *********************
  16. I need a function where it will get a string as parameter which will of syntax in VBScript like below a&"asdasd"&asd&"as&dsf&gdf"&fs Here in the above string what ever in the quotes we shouldn't replace them as they are taken as normal strings.And if the ampersand(&) if outside the quotes then we need to replace them with plus(+).And the normal words which are outside the quotes we need to append them with $. So the output will be as below. $a+"asdasd"+$asd+"as&dsf&gdf"+$fs. Can you please help me on this.I'm unable to differentiate with & in the quote
  17. Good day!!! In the process of the script vbs I use as an information window function ToolTip, example: Set objAutoItTT = WScript.CreateObject("AutoItX3.Control") strTT = "Update Adress Book. " & VbLf & "#############################" & VbLf objAutoItTT.ToolTip strTT & "Preparation, checks." , 50, 50In the process of writing the script used AutoitX3.dll library version Everything worked great. After upgrading to version of the library, the script works, but the windows are not displayed tooltip. Help me please!!!
  18. Hello, i would like to ask for some help on how to write something like this in Autoit If CType(update, WUApiLib.IUpdate3).BrowseOnly = True Then opt_updates = opt_updates + 1 Else imp_updates = imp_updates + 1 End IfI`m trying to find Important Windows updates only, but for some reason this code: $ColNeeded = $objSearcher.Search("BrowseOnly=0 and IsInstalled=0 and IsHidden=0") $update = $ColNeeded.Updates.Item($i - 1)returns all update (important and optional) as important (even though BrowseOnly=0). I think i`m missing a reference to WUApi.DLL in my code but i co
  19. With Hotkeys, the file is .ahk and the code inside is this: ^w:: Send, This is some text Return What is the equivalent in AutoIt Additionally how to launch a program with a hotkey? #n:: Run Notepad returnAny VERY simple way to do this with AutoIt? Thanks,
  20. Hi, I have a .dll (custom specific: ICE.dll) file created using vb.net and there is a function inside: when i read the api spec, got the following information: request you to provide the code to open/close. tried dllcall, dllopen, dllclose but it doesnt work. any help with code will be really appreciated. Thanks a lot. Best regards, Karthi Service name: ICE21 Syntax: byte ICE21 (byte status) Parameters (in): status (0-Open, 1- Close) Return value: byte 0 if everything was OK. Description: The function opens/closes the ICE plugin
  21. Hello I'm not so familiar with the scriptcontrol, can you help me with this little problem? Why is this script not working correctly? Global $oVbs = ObjCreate('MSScriptControl.ScriptControl') With $ovbs .Language = "VBScript" .AllowUI = True .AddCode('Class Test:Public Function X:X = 123:End Function:Set C = New Test') .AddCode('MsgBox IsObject(C)'); should be true, no? EndWith MsgBox(0,'',$oVbs.Eval('C').X)Also: how do I add code to the global module? Thanks, TheAutomator
  22. My objective was to translate to VBScript into an au3 file so I can code in autoit. I have most of it done however There seems to be certain COM events that autoit does not seem to catch. Mostly the session_SessionStatusChanged and session_SessionStatusLoginError that do not seem to work. When I run it in VBScript it works fine. Any ideas on what I might be doing wrong? I also attached the VBS file I was copying from. ;~ 'SessionStatusCode enum Const $SessionStatusCode_Disconnected = 0 Const $SessionStatusCode_Connecting = 1 Const $SessionStatusCode_TradingSessionRequested = 2 Cons
  • Create New...