Search found 56 matches

by serg
06 Jun 2019, 16:50
Forum: Scripts and Functions (v1)
Topic: MCode4GCC -- C/C++ to MCode Generator
Replies: 121
Views: 52940

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 (v1)
Topic: Get quotes from MT4/MT5 directly to AHK script
Replies: 3
Views: 2933

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 (v1)
Topic: How to connect to DDE server? (MT4)
Replies: 3
Views: 5894

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 (v1)
Topic: How to connect to DDE server? (MT4)
Replies: 3
Views: 5894

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 (v1)
Topic: How to connect to DDE server? (MT4)
Replies: 3
Views: 5894

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 (v1)
Topic: Lightweight alternative to GetKeyState()?
Replies: 4
Views: 1936

Re: Lightweight alternative to GetKeyState()?

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

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 (v1)
Topic: Lightweight alternative to GetKeyState()?
Replies: 4
Views: 1936

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 (v1)
Topic: GDI+ standard library 1.45 by tic
Replies: 438
Views: 247975

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 (v1)
Topic: GDI+ standard library 1.45 by tic
Replies: 438
Views: 247975

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 (v1)
Topic: GDI+ standard library 1.45 by tic
Replies: 438
Views: 247975

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 (v1)
Topic: GDI+ standard library 1.45 by tic
Replies: 438
Views: 247975

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 (v1)
Topic: GDI+ standard library 1.45 by tic
Replies: 438
Views: 247975

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...
by serg
17 Apr 2017, 02:21
Forum: Scripts and Functions (v1)
Topic: GDI+ standard library 1.45 by tic
Replies: 438
Views: 247975

Re: GDI+ standard library 1.45 by tic

Hi folks! What is the fastest way to test if image created with GDIP actually contains image? When I create bitmap and copy image there from image file - it works 99% of the time, but occasionally GDIP function returns empty image (I mean it returns handle that doesn't contain any image). Since I us...
by serg
03 Mar 2017, 06:36
Forum: Scripts and Functions (v1)
Topic: GDI+ standard library 1.45 by tic
Replies: 438
Views: 247975

Re: GDI+ standard library 1.45 by tic

Hi, has anyone encountered this problem with GDIP: - top 25 pixels of GDIP-created Gui are "un-clickable" when Gui is inactive? I.e. if I create GDIP Gui, then activate some other window, then click on top 25pix of this Gui - it doesn't get activated. If I click below top 25 pix - it does get activa...
by serg
14 Feb 2017, 10:32
Forum: Tutorials (v1)
Topic: How to optimize the speed of a script as much as possible.
Replies: 122
Views: 202091

Re: How to optimize the speed of a script as much as possible.

Guest3456, I ran your updated code, it gave me different results, traditional var assignments (without quotes) are the fastest :
4.884133
5.322768
4.117642
6.175888
3.612573
5.098961
So I guess PC setup makes difference here. I have Win8.1 64 with AHK 1.1.24
by serg
14 Feb 2017, 05:46
Forum: Tutorials (v1)
Topic: How to optimize the speed of a script as much as possible.
Replies: 122
Views: 202091

Re: How to optimize the speed of a script as much as possible.

That's interesting. I also added to the test comparison without quotes:

Code: Select all

if var = Hello World
It gave result about ~10% faster than the (case sensitive "if ==")-method - the fastest in your code above
by serg
11 Jan 2017, 07:26
Forum: Tutorials (v1)
Topic: How to optimize the speed of a script as much as possible.
Replies: 122
Views: 202091

Re: How to optimize the speed of a script as much as possible.

@Almost_there "Gdip_ImageSearch" by MasterFocus is much faster than native "ImageSearch", - at least it used to be. I use it for reading text from screen. Althou your last post should probably be in a separate thread I actually meant something completely different from ImageSearch. Maybe a Shape se...
by serg
11 Jan 2017, 04:19
Forum: Tutorials (v1)
Topic: How to optimize the speed of a script as much as possible.
Replies: 122
Views: 202091

Re: How to optimize the speed of a script as much as possible.

@Almost_there
"Gdip_ImageSearch" by MasterFocus is much faster than native "ImageSearch", - at least it used to be. I use it for reading text from screen.
Althou your last post should probably be in a separate thread
by serg
09 Jan 2017, 05:33
Forum: Tutorials (v1)
Topic: How to optimize the speed of a script as much as possible.
Replies: 122
Views: 202091

Re: How to optimize the speed of a script as much as possible.

This is quite useful thread, I want to add few points: A) Regular vars are retrieved faster than array elements (in example below ~3 times faster): ar := [1,2,3,4,5,6,7,8,9] t1 := a_tickcount Loop, 1000000 q1 := ar[1]*ar[2]*ar[3]*ar[4]*ar[5]*ar[6]*ar[7]*ar[8]*ar[9] t1 := a_tickcount - t1 ar1 := 1 , ...

Go to advanced search