Recently Browsing 0 members
No registered users viewing this page.
Good morning Forums
In these days, I am working on a project that involved me to use some Windows APIs to obtain some information about Terminal Servers.
I'm doing this using wtsapi32.dll in a VBA Project, but, the lack of knowledge about few things threated in the articles make this quite difficult to
implement and understand at the same time.
The most difficult thing I'm facing is "translating" C/C++ functions or struct in VBA when pointers are used, or pointers of pointers, and so on.
Since VBA seems to not have a pointer type, to make those functions work I need to implement other functions taken from other DLLs, and this confuses me a lot.
For example, starting from this code, I splitted all the functions and all the definitions to understand why they are there, and why I need to use them.
At the end, I've found out that the code I was going to implement starting from the functions provided in the Microsoft Docs won't be ever be able to work without some supplementary functions which are not mentioned anywhere.
So, I was wondering if someone would please point me out to a good and practical exaplanation about pointers (in general) or specifically for VBA, because I need to use them quite often in these days, and I'd like to understand what I am doing.
Thanks in advance.
Best Regards and Stay at home 🏡
I'm trying to write a script that connects with a VBA/COM API to get the status of a connected phone. I've been looking up and down this forum for tips or other user's experiences, but I can't seem to find anything (even remotely) similar. It shouldn't be so hard to do, however.
Software I'm trying to connect to
I'm trying to integrate CallCenter by using their API, which is documented over here : JustRemotePhone API Reference
Things I've tried
I've tried using ObjCreate but I don't get any result, it always returns the same (negative) error.
#Version 1 tried ObjCreate("JustRemotePhone.RemotePhoneService") #Version 2 tried ObjCreate("JustRemotePhoneCOM.RemotePhoneService") #Version 3 tried ObjCreate("JustRemotePhoneCOM.RemotePhoneService.Application") None of the three versions I tried seem to deliver any result other than a negative error value which basically says that the given class is not valid.
I am starting to get the hang of AutoIt by now, but unmanaged programming languages and object-oriented stuff is still quite a grey zone for me. If anyone could help me 'talk' to this application, I'd be immensely grateful!
Thanks in advance and kind regards from Belgium!
How do I properly convert this to Autoit? This is a VBA macro that I recorded in Excel.
ActiveSheet.Outline.ShowLevels RowLevels:=2 I need this to close my subtotal once it is finished.
any help will be greatly appreciated.
I am using Autoit to automate another software. I am looking to create a piece of code which can select the option from a combo box. I know what option I want to select and I have stored it in a string but nothing seems to be working for me.
I am able to click on the Control by using this code.
ControlClick("Import/Export Table Name", "","[NAME:cmbTableName]"); This is what I was thinking but doesn't work for me.
ControlCommand("Import/Export Table Name", "", "[NAME:cmbTableName]", "SelectString", $MyOptionName)
If it helps: The option name that I want to select is also stored in clipboard.
Any comments on what am I missing here will be appreciated.
I am trying to use ControlMove function AU3 DLL in VBA. The function instead of moving the control just makes it disappear. It only appears when I resize notepad manually.
Can anybody please help me and let me know whats the miss here
Here's the code I am working on:
Private Declare PtrSafe Function AU3_ControlMove Lib "C:\Program Files\AutoIt3\AutoItX\AutoItX3.dll" (ByVal szTitle As LongPtr, ByVal szText As LongPtr, ByVal szControl As LongPtr, ByVal nX As Integer, ByVal nY As Integer, nWidth As Integer, nHeight As Integer) As Long Private Function ControlMove(szTitle As String, szControl As String, nX As Integer, nY As Integer, Optional nWidth As Integer = -1, Optional nHeight As Integer = -1, Optional szText As String = "") As Long ControlMove = AU3_ControlMove(StrPtr(szTitle), StrPtr(szText), StrPtr(szControl), nX, nY, nWidth, nHeight) End Function Sub test() ControlMove "Untitled - Notepad", "[CLASS:Edit; INSTANCE:1]", 0, 0, 150, 150 End Sub The Edit Box in Notepad just disappears.