Search found 43 matches

by serg
15 Sep 2019, 05:32
Forum: Ask For Help
Topic: AHK has problem distinguishing hex numbers Topic is solved
Replies: 2
Views: 541

AHK has problem distinguishing hex numbers Topic is solved

Hi folks, I ran into some mysterious thing in AHK: when comparing 2 different hex numbers, ahk treats them as equal: q1 := "0xffffffffe90e1fe2" q2 := "0xffffffff8fb50aba" if (q1 = q2) msgbox, Equal I got these numbers from Winexist() after creating 2 GUI's. Any thoughts on what it means and how to d...
by serg
08 Jun 2019, 08:17
Forum: Scripts and Functions
Topic: MCode4GCC -- C/C++ to MCode Generator
Replies: 115
Views: 34427

Re: MCode4GCC -- C/C++ to MCode Generator

@Helgef
Thanks for the answers!
by serg
08 Jun 2019, 07:45
Forum: Scripts and Functions
Topic: MCode4GCC -- C/C++ to MCode Generator
Replies: 115
Views: 34427

Re: MCode4GCC -- C/C++ to MCode Generator

I got resulting machine code that is very slow compared to regular AHK code For example: q1 := 3 , q2 := 2 a := A_TickCount Loop 1000 q := DllCall(MCode("2,x64:icgPr8LD"),"int",q1,"int",q2,"cdecl") ; "2,x64:icgPr8LD" = q1*q2 a := A_TickCount-a msgbox %a% ms`n`nAnswer: %q% a := A_TickCount Loop 1000 ...
by serg
08 Jun 2019, 07:12
Forum: Scripts and Functions
Topic: MCode4GCC -- C/C++ to MCode Generator
Replies: 115
Views: 34427

Re: MCode4GCC -- C/C++ to MCode Generator

Thanks for reply Joedf, I installed more blocks for MinGW and TDM, MinGW still refuses to work, but TDM finally works! :=) May I ask you few more things (forgive me if questions are stupid, my level of knowledge here is quite low): 1) Is it possible to convert float/double functions to MCode using y...
by serg
07 Jun 2019, 10:38
Forum: Scripts and Functions
Topic: MCode4GCC -- C/C++ to MCode Generator
Replies: 115
Views: 34427

Re: MCode4GCC -- C/C++ to MCode Generator

Okay... weird I just tested with tdm64-gcc-5.1.0-2... and no issues at all... :think: When you select compiler (with tdm64-gcc), what file and in what folder do you select? When I select C:\TDM-GCC-64\bin\g++.exe (or gcc.exe or x86_64-w64-mingw32-g++.exe), error log tells me that g++.exe: error: Cr...
by serg
07 Jun 2019, 10:28
Forum: Scripts and Functions
Topic: MCode4GCC -- C/C++ to MCode Generator
Replies: 115
Views: 34427

Re: MCode4GCC -- C/C++ to MCode Generator

Hi Joedf, could you please tell me what Im doing wrong here: Simple C function like "return 42" compiles with MCode4GCC+MinGW and returns correct result (42) just fine. Also when I use machine code from your examples (like "2,x64:M8A4AXQKSP/B/8CAOQB19vPD" for string length), MCode() func also return...
by serg
06 Jun 2019, 16:50
Forum: Scripts and Functions
Topic: MCode4GCC -- C/C++ to MCode Generator
Replies: 115
Views: 34427

Re: MCode4GCC -- C/C++ to MCode Generator

Hi Joedf I just figured out how to use your MCode4GCC, thanks for making it! There are few small issues with it thou: 1) It didn't work on my 64 computer until I changed 64/32 results in Get_CompilerType(cp) , probably Is64BitAssembly(cp) doesnt work properly 2) It works with MinGW, but doesnt with ...
by serg
10 Jun 2017, 06:52
Forum: Scripts and Functions
Topic: Get quotes from MT4/MT5 directly to AHK script
Replies: 1
Views: 1350

Get quotes from MT4/MT5 directly to AHK script

I want to share this simple code that allows to bypass DDE server, and receive live data from MT4/MT5 directly to your AHK script. See comments in the code below for details. 1) Get handle of the AHK script that will receive data from MT4 and store it in a separate file DetectHiddenWindows On AHK_HW...
by serg
10 Jun 2017, 06:42
Forum: Ask For Help
Topic: How to connect to DDE server? (MT4)
Replies: 3
Views: 5003

Re: How to connect to DDE server? (MT4)

I was confused about DDE protocol, due to my ignorance, I thought it was something else. After reading MSDN, looks like DDE is nothing more than just exchanging system messages (same as PostMsg + OnMessage). So one can write MT4 indicator that would post messages with last ticks directly to AHK scri...
by serg
07 Jun 2017, 09:39
Forum: Ask For Help
Topic: How to connect to DDE server? (MT4)
Replies: 3
Views: 5003

Re: How to connect to DDE server? (MT4)

it will be easier to write an EA directly rather than using AHK I need to get quotes for my existing AHK script. And MQL doesn't have all the functionality that I need. For now Im using Excel to get access to MT4 DDE server, but trying to get direct access. As a workaround, I wrote MQL indicator th...
by serg
07 Jun 2017, 06:05
Forum: Ask For Help
Topic: How to connect to DDE server? (MT4)
Replies: 3
Views: 5003

How to connect to DDE server? (MT4)

Hi folks! Im trying to connect to DDE sevrver using AHK. Server that Im trying to work with is from MT4 (forex charting/data software), but I guess it doesn't matter, since all DDE servers probably work in same format. So, I found 2 DDE libraries here on AHK forum (attached below), and tried to use ...
by serg
24 May 2017, 02:49
Forum: Ask For Help
Topic: Lightweight alternative to GetKeyState()?
Replies: 4
Views: 1409

Re: Lightweight alternative to GetKeyState()?

evilC, thanks!
by serg
23 May 2017, 02:36
Forum: Ask For Help
Topic: Lightweight alternative to GetKeyState()?
Replies: 4
Views: 1409

Re: Lightweight alternative to GetKeyState()?

evilC, thanks!
Yeah, that' a good idea. I will just add SetTimer to wait few seconds before showing tooltip
by serg
22 May 2017, 04:14
Forum: Ask For Help
Topic: Lightweight alternative to GetKeyState()?
Replies: 4
Views: 1409

Lightweight alternative to GetKeyState()?

Hi folks,
Is there a more lightweight way of checking if Ctrl/Shift/Alt buttons are pressed than GetKeyState()?
I have keys get stuck sometimes on my old PC, and since many keys need to be constantly monitored, I wonder if there is a more lightweight / non-intrusive way to check them.
Thanks!
by serg
18 Apr 2017, 03:09
Forum: Scripts and Functions
Topic: GDI+ standard library 1.45 by tic
Replies: 368
Views: 133717

Re: GDI+ standard library 1.45 by tic

Hi Noname,
GDIP itself is started only once in my script, I don't know yet what exactly causes the problems, but I think Helgef's suggestion:

Code: Select all

if Error := DLLCall(...) ...
will catch the perpetrator soon
Thanks again!
by serg
17 Apr 2017, 11:49
Forum: Scripts and Functions
Topic: GDI+ standard library 1.45 by tic
Replies: 368
Views: 133717

Re: GDI+ standard library 1.45 by tic

noname wrote: It has something to do with Gui,new . I have the problem on winXP but not on win10.
Noname, you are absolutely correct, - not using "Gui,new" fixes the problem.
Thank you for setting me on the right path! :-)

BTW, should it be reported to Lexikos as a bug?
by serg
17 Apr 2017, 11:41
Forum: Scripts and Functions
Topic: GDI+ standard library 1.45 by tic
Replies: 368
Views: 133717

Re: GDI+ standard library 1.45 by tic

Helgef, I really appreciate your help! Thanks!
by serg
17 Apr 2017, 10:32
Forum: Scripts and Functions
Topic: GDI+ standard library 1.45 by tic
Replies: 368
Views: 133717

Re: GDI+ standard library 1.45 by tic

Noname, thanks for your input !
I'll try your code. Btw, I have this problem only on my other Win 7 machine, but not on Win 8.1
by serg
17 Apr 2017, 10:22
Forum: Scripts and Functions
Topic: GDI+ standard library 1.45 by tic
Replies: 368
Views: 133717

Re: GDI+ standard library 1.45 by tic

Check if the functions you are using sets ErrorLevel or the underlying windows functions sets A_LastError . If there is no image, maybe it doesn't have a width and height . Good luck Helgef, thanks for response! I have 2 suspect GDIP functions: Gdip_GraphicsFromImage(pBitmap){ DllCall("gdiplus\Gdip...

Go to advanced search