Search found 15 matches

by terrypaton2
12 Sep 2018, 22:17
Forum: Ask For Help
Topic: Mcode! how to use pow,sqrt,... in machine code
Replies: 2
Views: 131

Mcode! how to use pow,sqrt,... in machine code

Hi Pls view code below, I get a error : CONTINUABLE EXCEPTION_ACCESS_VIOLATION when I run code. Why I can not use pow in this case? I tried compiler with flag -lm but not work Varsetcapacity(in1,4,0) Numput(2,in1,0,"int") Varsetcapacity(out,4,0) //hex code :534883EC20660FEFC9F20F1005000000004889D3F2...
by terrypaton2
11 Sep 2018, 12:24
Forum: Ask For Help
Topic: How to I create gaussian blur image?
Replies: 3
Views: 162

Re: How to I create gaussian blur image?

Masonjar13 wrote:GIMP has a command-line interface, open-source and free.
thank you but I need to script run on ahk
by terrypaton2
11 Sep 2018, 10:01
Forum: Ask For Help
Topic: How to I create gaussian blur image?
Replies: 3
Views: 162

How to I create gaussian blur image?

Hi,
I tried Gdip_BlurBitmap but the output Image is strange. So, Any way to create gaussian blur image?
by terrypaton2
31 Aug 2018, 09:45
Forum: Ask For Help
Topic: machine code alway return -0.00000
Replies: 5
Views: 237

Re: machine code alway return -0.00000

Helgef wrote:Your float is stored at a relative address, the address is supposed to be determined at link time. You have to link it manually.
thank you but I am a newbie, How do I do that? Can you share me a example?
by terrypaton2
31 Aug 2018, 07:41
Forum: Ask For Help
Topic: machine code alway return -0.00000
Replies: 5
Views: 237

machine code alway return -0.00000

pls view code below, Its a simple code that return 0.5, but why I can not get correct value, It alway return -0.000000.I tried return int, its work perfect but no work with float and double. What did I do wrong? //hex code: F30F100500000000C3909090909090900000003F000000000000000000000000 test:=Mcode...
by terrypaton2
21 Aug 2018, 23:55
Forum: Ask For Help
Topic: why numget return false value Topic is solved
Replies: 3
Views: 142

Re: why numget return false value Topic is solved

jeeswg wrote:Use +0, otherwise it refers to the address of the variable (instead of the address value contained within the variable). Cheers.
NumGet(subVar+0, 0, "UInt")
thank you so much :dance:
by terrypaton2
21 Aug 2018, 22:36
Forum: Ask For Help
Topic: why numget return false value Topic is solved
Replies: 3
Views: 142

why numget return false value Topic is solved

Pls view code below, why numget return false value when passing "&var" to function "func(&var)". I think it will return "5555" but I recieved a number like this "3407923" global var F1:: VarSetCapacity(var,4) Numput(5555,var,0,"UInt") func(&var) return func(subVar){ Outputdebug % subVar msgbox % Num...
by terrypaton2
18 Aug 2018, 02:04
Forum: Ask For Help
Topic: How to create a thread inside another thread?
Replies: 2
Views: 481

How to create a thread inside another thread?

Hi, I want to create a subThread inside a MainThread , I tried code below but I get a error. I use AHK_H v1 64bit 1.1.29 Loop, 2 { MainThreads[A_Index]:=AhkThread(" ( #NoEnv SetBatchLines -1 ListLines Off global disNoxPlayerX:=120 global disNoxPlayerY:=120 ;Dosomething SubThreads:=AhkThread("" ( msg...
by terrypaton2
04 Aug 2018, 05:15
Forum: Ask For Help
Topic: Mcode DllCall - How to return an array? Topic is solved
Replies: 14
Views: 586

Re: Mcode DllCall - How to return an array? Topic is solved

Thank to @nnnik, @Helgef, @guest3456 for help. I passing my array to dllcall and handle it in c code, then I use NumGet to get element of array, now Its working. ahk code global myarr F1:: VarSetCapacity(myarr, 40,0) str:=str "2,x64:SInIxwEAAAAAx0EEAQAAAMdBCAIAAADHQQwDAAAAx0EQBAAAAMdBFAUAAADHQRgGAAA...
by terrypaton2
04 Aug 2018, 03:54
Forum: Ask For Help
Topic: Mcode DllCall - How to return an array? Topic is solved
Replies: 14
Views: 586

Re: Mcode DllCall - How to return an array? Topic is solved

And the assembly listing (thats more important) and could you output your code as hex since I cannot read base64. Is this assembly listing? 1 .file "checkdupplicate - Copy.c" 2 .section .text.unlikely,"x" 3 .LCOLDB0: 4 .text 5 .LHOTB0: 6 .p2align 4,,15 7 .globl funcarr 8 .def funcarr; .scl 2; .type...
by terrypaton2
04 Aug 2018, 03:12
Forum: Ask For Help
Topic: Mcode DllCall - How to return an array? Topic is solved
Replies: 14
Views: 586

Re: Mcode DllCall - How to return an array? Topic is solved

@nnnik I use MCode4GCC (https://github.com/joedf/MCode4GCC), I use GCC compiler TDM-GCC-64 and set optimization -O3
by terrypaton2
03 Aug 2018, 22:40
Forum: Ask For Help
Topic: Mcode DllCall - How to return an array? Topic is solved
Replies: 14
Views: 586

Re: Mcode DllCall - How to return an array? Topic is solved

an AHK array and a C array are not going to be compatible. not sure why you think they would be. maybe depending on how the C array is stored, you could use NumGet in AHK to get the memory stored at a certain byte offset Numget return the binary number like this "15423648984" but I need to get elem...
by terrypaton2
03 Aug 2018, 21:10
Forum: Ask For Help
Topic: Mcode DllCall - How to return an array? Topic is solved
Replies: 14
Views: 586

Mcode DllCall - How to return an array? Topic is solved

I am a newbie, I am trying to return a int array from machine code by Dllcall. I can call the code, but when I try get a element of array , I recieved a blank value. ahk code: CheckDup:=Mcode("2,x64:SI0FAAAAAMOQkJCQkJCQkAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

Go to advanced search