Search found 1900 matches

by teadrinker
26 Nov 2020, 18:01
Forum: Ask For Help
Topic: How to draw a simple filled rectangle, no frills
Replies: 10
Views: 159

Re: How to draw a simple filled rectangle, no frills

boiler wrote:

Code: Select all

BlackRect(x, y, w, h) {
	static n := 0
	n++
What if Gui, 1: is already created? :)
by teadrinker
26 Nov 2020, 07:58
Forum: Ask For Help
Topic: Regexreplace space and other caracters
Replies: 4
Views: 51

Re: Regexreplace space and other caracters

sofista wrote: Same approach as @mcl 's
No, look:

Code: Select all

str = abc___###123
MsgBox, % RegExReplace(str, "[^0-9A-Za-z]", "")
MsgBox, % RegExReplace(str, "\W", "")
This one is shorter:

Code: Select all

str = abc___###123
MsgBox, % RegExReplace(str, "i)[^\da-z]")
by teadrinker
24 Nov 2020, 12:00
Forum: Ask For Help
Topic: Read resource from file
Replies: 6
Views: 205

Re: Read resource from file

Try this: SetWorkingDir, % A_ScriptDir FileInstall, Android.png, % emptyVar Gui, Add, Pic, x0 y0, % "HBITMAP:" . HBitmapFromResource("Android.png") Gui, Show Return GuiClose: ExitApp HBitmapFromResource(resName) { if !A_IsCompiled hBitmap := LoadPicture(resName, "GDI+") else { hMod := DllCall("GetMo...
by teadrinker
22 Nov 2020, 18:10
Forum: Ask For Help
Topic: Reading time with very big strings Topic is solved
Replies: 18
Views: 393

Re: Reading time with very big strings Topic is solved

c7aesa7r wrote: What does this dllcall?
It sets the Working Set size. You can read about this function here.
c7aesa7r wrote: But using another program to measure mem usage its showing the normal value.
It depends on which memory it shows. Perhaps it's commited memory.
You can find more explanations here.
by teadrinker
22 Nov 2020, 16:28
Forum: Ask For Help
Topic: Reading time with very big strings Topic is solved
Replies: 18
Views: 393

Re: Reading time with very big strings Topic is solved

c7aesa7r wrote: But it did not changed anything about the mem usage
You can additionaly try this:

Code: Select all

DllCall("SetProcessWorkingSetSize", "Ptr", -1, "Ptr", -1, "Ptr", -1)
by teadrinker
21 Nov 2020, 16:53
Forum: Ask For Help
Topic: Show content of the edit field when closing GUI Topic is solved
Replies: 6
Views: 91

Re: Show content of the edit field when closing GUI Topic is solved

Code: Select all

Gui, Add, Edit, r12 vMyEdit w555 -VScroll -HScroll, text
Gui, Show, Center
OnExit("SaveContent")
Return

SaveContent(){
Gui, +OwnDialogs
GuiControlGet, MyEdit
MsgBox, % MyEdit
}

GuiClose:
GuiEscape:
ExitApp
by teadrinker
21 Nov 2020, 12:43
Forum: Ask For Help
Topic: URLDownloadToFile and Cloudflare
Replies: 12
Views: 278

Re: URLDownloadToFile and Cloudflare

That is an implementation of Internet Explorer, not the Edge browser. :)
by teadrinker
21 Nov 2020, 12:27
Forum: Ask For Help
Topic: URLDownloadToFile and Cloudflare
Replies: 12
Views: 278

Re: URLDownloadToFile and Cloudflare

TheDewd wrote: emulating the edge browser
How did you achieve this?
by teadrinker
18 Nov 2020, 10:50
Forum: Ask For Help
Topic: Using an animated Gif on a gui Topic is solved
Replies: 3
Views: 131

Re: Using an animated Gif on a gui Topic is solved

Try this: #NoEnv ; #Include Gdip_All.ahk SetBatchLines, -1 filePath := "C:\Users\User\Desktop\crash.gif" ; specify the file path to gif pToken := Gdip_Startup() OnExit, Exit exStyles := (WS_EX_COMPOSITED := 0x02000000) | (WS_EX_LAYERED := 0x80000) Gui, New, +E%exStyles% Gui, Add, Picture, y10 hwndhw...
by teadrinker
17 Nov 2020, 12:19
Forum: Ask For Help
Topic: Automatically grab two numbers from a web-page; calculate their multiplication; fill in the result back onto the webpage
Replies: 7
Views: 203

Re: Automatically grab two numbers from a web-page; calculate their multiplication; fill in the result back onto the web

how to use that currQ and currA elements? You can refer to page elements by their id only from the DOM context. Easiest way to get DOM of a page is using the InternetExplorer.Application COM object. Try readind these links, if you understand something, I may get you an example. Anyway you have to u...
by teadrinker
15 Nov 2020, 11:04
Forum: Ask For Help
Topic: Read jpg-image binary - is it possible? Topic is solved
Replies: 11
Views: 249

Re: Read jpg-image binary - is it possible? Topic is solved

But what are you going to do with the binary buffer?
by teadrinker
15 Nov 2020, 07:39
Forum: Ask For Help
Topic: Read jpg-image binary - is it possible? Topic is solved
Replies: 11
Views: 249

Re: Read jpg-image binary - is it possible? Topic is solved

Albireo wrote: this use StrLen()
No one of them use StrLen() with a binary buffer.
I don't quite understand what you want to achieve. :)
Albireo wrote: information from file1 is not displayed correctly
What are you expecting?
by teadrinker
14 Nov 2020, 19:28
Forum: Ask For Help
Topic: Read jpg-image binary - is it possible? Topic is solved
Replies: 11
Views: 249

Re: Read jpg-image binary - is it possible? Topic is solved

Albireo wrote:

Code: Select all

len := strLen(Content)
Content is not a string, so you cannot get its size using StrLen(). But you can get its capacity:

Code: Select all

MsgBox, % VarSetCapacity(Content)
Take into account that the buffer capacity is not the same as the file size, the capacity may exceed the file size.
by teadrinker
14 Nov 2020, 17:44
Forum: Ask For Help
Topic: Read jpg-image binary - is it possible? Topic is solved
Replies: 11
Views: 249

Re: Read jpg-image binary - is it possible? Topic is solved

Waiting for "It doesn't work for me" Albireo saying. :lol:
by teadrinker
14 Nov 2020, 17:30
Forum: Ask For Help
Topic: Read jpg-image binary - is it possible? Topic is solved
Replies: 11
Views: 249

Re: Read jpg-image binary - is it possible? Topic is solved

Code: Select all

; reading binary data into buff
FileRead, buff, *c MyFile.jpg 
by teadrinker
14 Nov 2020, 17:05
Forum: Ask For Help
Topic: Compare the logotype(image) in PDF-files with an original image
Replies: 17
Views: 331

Re: Compare the logotype(image) in PDF-files with an original image

CompareFiles(filePath1, filePath2) { Loop 1 { Loop 2 File%A_Index% := FileOpen(filePath%A_Index%, "r") len := File1.Length if (len = "" || len != File2.Length) Break Loop 2 { File%A_Index%.Pos := 0 File%A_Index%.RawRead(buff%A_Index%, len) } cmp := true } Loop 2 File%A_Index%.Close() Return cmp && ...

Go to advanced search