BotIt FindAndClick
-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By argumentum
...trying to get the MonthCal font size, given that when loading it ( GUICtrlCreateMonthCal() ), this Win32 control has the font size auto-adjusted by the OS and working with display scaling, getting the font that is visually congruent, getting this value should make it the perfect font size for my GUI.
My question is how to get this ( https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.monthcalendar.size?view=windowsdesktop-6.0 ) working from within AutoIt3.
This should work in any PC given that the .NET supports this call in every version of .NET
Thanks. ( I have no clue of C# or .NET )
-
By Skeletor
Hi All,
So I was searching through the internet and found a plethora of information to learn C#.
However, some are way below par and does not explain very well.
So, anyone can suggest a proper website or eBook or video course explaining C#?
I've learnt AutoIt (still I'm learning it) by making small programs, reading the forums, going through the F1 guide (huge help, seriously this helps alot) and reading the Wiki.
Any direction would be appreciated, just not off the edge of a cliff..
-
By moooe
There is an API for hardware, which is implemented through Lusbapi.dll
In the C ++ reference it looks like this:
1) if (GetDllVersion() != 2) { printf("error 1"); }
2) pModule = static_cast<ILE440 *>(CreateInstance("e440"));
if (pModule == NULL) { printf("error 2"); }
3) if (!pModule->GetModuleName()) { printf("error 3"); }
For AutoIt I rewrote:
$hDLL = DllOpen('Lusbapi.dll')
1) $aRes = DllCall($hDLL, 'LRESULT', 'GetDllVersion')
if $aRes[0] <> 2 then Exit
2) $tDeviceName = DllStructCreate("char DeviceName[9]")
DllStructSetData($tDeviceName, "DeviceName", 'e440')
$aRes = DllCall($hDLL, 'PTR', 'CreateLInstance', 'STRUCT*', $tDeviceName)
$pModule = $aRes[0]
if $pModule == Null then Exit
3) At this step, the error
$aRes = DllCall($hDLL, 'PTR', 'GetModuleName')
The function GetModuleName was not found (since this is a method from the CreateLInstance function), I could not implement a call to the method
-
By Colduction
Hi AutoIt programmers, excuse me for bothering you with multiple topics.
In AutoIt we can use Number() function to convert Hex string to number but it's output is different of C# output & and i wanna make it's output like AutoIt code.
For e.g I use this in AutoIt:
Local $dBinary = Binary("Hello") ; Create binary data from a string. Local $dExtract = Number(BinaryMid($dBinary, 1, 5)) ConsoleWrite($dExtract & @CRLF) And i use this for C#:
using System; using System.Text; //NameSpace Is Use of Project Name namespace TEST { class Program { public static void Main(string[] args) { //declaring a variable and assigning hex value string dd = ToHex("Hello", Encoding.ASCII); decimal d = Int64.Parse(dd, System.Globalization.NumberStyles.HexNumber); Console.WriteLine("Result: " + d); //hit ENTER to exit Console.ReadLine(); } public static string ToHex(string sInput, Encoding oEncoding, bool b0x_Prefix = false) { byte[] a_binaryOutput = oEncoding.GetBytes(sInput); string sOutput = BitConverter.ToString(a_binaryOutput).Replace("-", ""); if (b0x_Prefix == false) { return sOutput; } else { return "0x" + sOutput; } } } }
I say once again that excuse me for creating new topic, in fact i'm making a library for GAuthOTP from a topic in AutoIt.
-
By Aelc
Hey there,
I'm trying to create an DLL callback loop to get an updated screen (actually just 1 pic that should refresh because i already got a screencapturetool to get a pic from my game every sec)
i want to bring that pic on a mobile phone. the dll can connect with the program i'm using to get the connection so that's fine.
The prob is: it's my first DLL project so i don't even get 1 call or other returns of it. I tried much with the examples but i can't compare it that much with it.
The calls shall be with c# where i'm not familiar with... i just searched much in forums and programsites but i didn't get a reference point.
could someone have a tip to start please?
there are calls like
[DllImport("file.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] public static extern bool $funcname1(String identifier, String friendlyName, ref CbConext callback);
[DllImport("file.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] public static extern bool $funcname2(String identifier, String friendlyName, ref logiArxCbContext callback, byte [] iconBitmap);
[DllImport("file.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)] public static extern bool $funcname3(String filePath, String fileName, String mimeType = "");
tried something like
$dll = DllOpen ("file.dll")
$call = DllCall ( $dll,"bool","$funcname1","str","indetifier","str","test","int","CbContext callback" )
or have i work with dllstructcreate or dllcallbackregister?
it would be enough for me if someone just could explain me how to get the imports with the params/funcs/types in autoit.
i don't know if it's important but u shall call
public classes and public constants in c# before such as using.system make this sense?
sry for my bad english
and thank you in advance
-
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now