Search found 69 matches

by smarq8
12 Aug 2018, 13:48
Forum: Ask For Help
Topic: How to create static var inside class that is separate from any other initialized object? Topic is solved
Replies: 2
Views: 512

Re: How to create static var inside class that is separate from any other initialized object? Topic is solved

Thanks, it probably does work fine now. Serial := new _serial() return class _serial { __new() { RX := new FIFO(1024*128) TX := new FIFO(1024*128) msgbox,% RX.adr "`n" TX.adr } } class FIFO { buf := "" adr := 0 size := 0 __new(_size){ ;static buf ; <---------- How to create separate buffer for each ...
by smarq8
12 Aug 2018, 13:21
Forum: Ask For Help
Topic: How to create static var inside class that is separate from any other initialized object? Topic is solved
Replies: 2
Views: 512

How to create static var inside class that is separate from any other initialized object? Topic is solved

So i am currenty writing class for Serial communication. Until now i use only one FIFO buffer for rx and everything work fine, but now i need to add tx buffer and here begin my problem because for rx and tx share same memory space (bot buffer has the same address). So is it possible to make buffer s...
by smarq8
19 Jul 2018, 23:35
Forum: Wish List
Topic: one line IF command
Replies: 4
Views: 1499

one line IF command

It would be great if I can use command at the same line as my if statement the same as in c/++
for example

Code: Select all

test := 1
if (test) msgbox
or
if (test) return <expression>
or
if (test) { <command1>; <command2>; <command3>; return }
by smarq8
17 Jun 2018, 03:12
Forum: Ask For Help
Topic: how to determine if variable is gui var or hwnd?
Replies: 3
Views: 650

how to determine if variable is gui var or hwnd?

i want to write function where as param i can pass control var or hwnd. So can I somehow determine when I pass hwnd or control var?

Code: Select all

LB_GetCount(Byref control){
	GuiControlGet,hLB,Hwnd,control
	return DllCall("SendMessage", "uint", hLB, "uint", 0x18B) ; LB_GETCOUNT
}
by smarq8
26 May 2018, 06:08
Forum: Ask For Help
Topic: unable to receive data from COM port (STM32) Topic is solved
Replies: 3
Views: 739

Re: unable to receive data from COM port (STM32) Topic is solved

I already FOUND solution. To initialize connection it is required to use 'dtr=on' setting
by smarq8
26 May 2018, 03:41
Forum: Ask For Help
Topic: unable to receive data from COM port (STM32) Topic is solved
Replies: 3
Views: 739

Re: unable to receive data from COM port (STM32) Topic is solved

nope, serial monitor do not know what is ur device baud rate, you must select it manually. Serial.begin(1000000); is to setup your uC, not your monitor which is independent device. As i mentioned it must be equal for standard arduino uno/nano but for STM with bootloader serial monitor work always in...
by smarq8
25 May 2018, 14:43
Forum: Ask For Help
Topic: unable to receive data from COM port (STM32) Topic is solved
Replies: 3
Views: 739

unable to receive data from COM port (STM32) Topic is solved

I try to receive data from my STM32 but from unknow reason I can only send them to it. I write my class based on some scripts in this forum and it work great for arduino uno/nano but with STM32 and bootloader to enable serial port via usb not. The odd thing in this case is that arduino serial monito...
by smarq8
23 May 2018, 10:12
Forum: Scripts and Functions
Topic: GDI+ standard library 1.45 by tic
Replies: 350
Views: 106905

Re: GDI+ standard library 1.45 by tic

untill i use it for only quick boundary align then it look ok, that why i create Gdip_TextToGraphics2() instead of overwite oryginal function and lost time in the future because no backward compatibility scripts
by smarq8
23 May 2018, 09:19
Forum: Scripts and Functions
Topic: GDI+ standard library 1.45 by tic
Replies: 350
Views: 106905

Re: GDI+ standard library 1.45 by tic

Top option does mean if you use x50 y100 then your string should by aligned by the top of its boundary so your string should be below y100, is you use Bottom option then text should be above y100 because bottom of the text is aligned to coordinates, if you use Right then it should ba on the left sid...
by smarq8
23 May 2018, 08:13
Forum: Scripts and Functions
Topic: GDI+ standard library 1.45 by tic
Replies: 350
Views: 106905

Re: GDI+ standard library 1.45 by tic

However, how could you expect to calculate the Center or Bottom without knowing the height? if Height=0, when what is the "center"? because this function first measure boundary dimmension and them move in once of the expected side by the half of it independent of font size etc here is resoult after...
by smarq8
22 May 2018, 09:06
Forum: Scripts and Functions
Topic: GDI+ standard library 1.45 by tic
Replies: 350
Views: 106905

Re: GDI+ standard library 1.45 by tic

i found problem with Gdip_TextToGraphics() and not working vertical alignment (vCentre|vCenter|Top|Up|Bottom|Down) Here is my solution: replace this: Gdip_TextToGraphics(pGraphics, Text, Options, Font="Arial", Width="", Height="", Measure=0) whit this: Gdip_TextToGraphics(pGraphics, Text, Options, F...
by smarq8
21 Jan 2018, 11:51
Forum: Ask For Help
Topic: GDI+ hBitmap vs pBitmap vs pGraphics vs hdc
Replies: 0
Views: 266

GDI+ hBitmap vs pBitmap vs pGraphics vs hdc

What are difference between these 4 "things"? Why most gdi function use other "things"? I'm also confused when I should destory them. For example I convert pBitmap>hbitmap, so can I destory pBitmap? Or if I do not delete pBitmap and then make stuff on it, will this affect on hBitmap? And the similar...
by smarq8
21 Jan 2018, 07:53
Forum: Ask For Help
Topic: OCR differentiate colored text from black one
Replies: 4
Views: 626

Re: OCR differentiate colored text from black one

@boiler windows 7 screens magnifier blur image when "Composion" is enabled, other system as i remeber are fine.
by smarq8
21 Jan 2018, 07:38
Forum: Ask For Help
Topic: Listview with large thumbail without stretching
Replies: 4
Views: 597

Re: Listview with large thumbail without stretching

here is my solution using ILC_ORIGINALSIZE. Now Im wondering is it possible to center image inside tile because it is always aligned to left up corner. I also need to load images other than .bmp https://image.ibb.co/coJxRw/screenshot_1516537857.png #include <GDIp> Gdip_Startup() #Singleinstance, for...
by smarq8
21 Jan 2018, 04:59
Forum: Ask For Help
Topic: Listview with large thumbail without stretching
Replies: 4
Views: 597

Re: Listview with large thumbail without stretching

it also stretch my images without aspect ratio

Image
by smarq8
20 Jan 2018, 16:59
Forum: Ask For Help
Topic: Listview with large thumbail without stretching
Replies: 4
Views: 597

Listview with large thumbail without stretching

I need to display in my LV image thimbails. My code already work except that I need larger icons with preserved aspect ratio. Any help? #include <GDIp> Gdip_Startup() Gui, Add, ListView, r30 w300 hwndhLV, image|w|h ; Create a ListView. dir := "D:\x\ClearedText\tesseract\old\oem0_psm6_20180114221528_...
by smarq8
13 Jan 2018, 13:11
Forum: Ask For Help
Topic: Need help with XML parse
Replies: 2
Views: 706

Need help with XML parse

I want to read hocr file (XML format) but I can not get any resoult. So where is mistake in this code? gosub tst ;msgbox,% xmldata doc := ComObjCreate("MSXML2.DOMDocument.6.0") doc.async := false doc.loadXML(xmldata) ;al(doc) ;DocNode := doc.selectSingleNode("//html/body/div[0]").getAttribute("title...
by smarq8
03 Jan 2018, 12:33
Forum: Ask For Help
Topic: GDI+ - direct pixel manipulation
Replies: 3
Views: 660

GDI+ - direct pixel manipulation

How can I access to raw byte array of GDI+ bitmap? For example I load my image by pBitmap := Gdip_CreateBitmapFromFile() and I display it frequently in my gui using this (I can see whole processing): SetImageFromBitmap(h,pBitmap){ hBitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap) SetImage(h, hBitmap)...
by smarq8
05 Sep 2017, 15:41
Forum: Ask For Help
Topic: ByRef and recusive function can not pass objects?
Replies: 1
Views: 322

ByRef and recusive function can not pass objects?

When i call f() then object is passed properly but when its called from inside this function then x is empty. Is it some ahk limitation or what? #SingleInstance force SetBatchLines, -1 buf := [11, 12, 13, 14, 25, 26, 27, 28] f(buf) ;al(buf) return f4::Reload f(ByRef x){ msgbox,% IsObject(x) ;x.2 := ...
by smarq8
22 Aug 2017, 11:32
Forum: Ask For Help
Topic: change grouped radio buttons with GuiControl not working? Topic is solved
Replies: 5
Views: 857

Re: change grouped radio buttons with GuiControl not working? Topic is solved

so its not possible to do with using only "v_ShiftMode" var?

Go to advanced search