Search found 509 matches

by noname
04 Jan 2018, 08:56
Forum: Ask For Help
Topic: GDI+ - direct pixel manipulation
Replies: 3
Views: 809

Re: GDI+ - direct pixel manipulation

You can find the code in Helgef's GetBitmap function . Original post : https://autohotkey.com/boards/viewtopic.php?t=35888 _getBitmap(hBitmap){ ; Url: ; - https://msdn.microsoft.com/en-us/library/windows/desktop/dd144904%28v=vs.85%29.aspx (GetObject function) ; - https://msdn.microsoft.com/en-us/lib...
by noname
01 Jan 2018, 11:11
Forum: Ask For Help
Topic: What would be a better way to roll for RGB color values? (AA00FF, 272727, etc.) Topic is solved
Replies: 10
Views: 2295

Re: What would be a better way to roll for RGB color values? (AA00FF, 272727, etc.) Topic is solved

https://i.imgur.com/e3supcM.png You can always use BitBild to draw direct on the window , it can update to 60fps without flickering. Here is an example but i never mixed this with a standard Gui using controls so maybe there are side effects , i mostly use a layered window to create smooth interfac...
by noname
01 Jan 2018, 08:53
Forum: Ask For Help
Topic: Different days different hotstrings, what to do? Topic is solved
Replies: 2
Views: 491

Re: Different days different hotstrings, what to do? Topic is solved

You can adapt an existing one to suit your requirements:

https://autohotkey.com/board/topic/1957-hotstring-gui/

Tried it on win10 and it seems to work ( script was posted January 2005 ! )
by noname
01 Jan 2018, 08:30
Forum: Ask For Help
Topic: Clipboard not work properly with ^v Topic is solved
Replies: 2
Views: 773

Re: Clipboard not work properly with ^v Topic is solved

https://i.imgur.com/FjDn18t.png Do not find any problem , some other ( ahk ?) program must be interfering with your clipboard. Loop,1000 foo .="o" run , notepad.exe WinWaitActive, ahk_exe notepad.exe loop 20 { clipboard:="" QPC(1) Clipboard :=foo QPC(0) "`n" clipwait Send ^v } exitapp QPC(R := 0) {...
by noname
01 Jan 2018, 03:07
Forum: Ask For Help
Topic: Text retrieved vai ControlGetText, sends some unicode characters like- )[email protected]#$%^&*( . Why? Topic is solved
Replies: 6
Views: 947

Re: Text retrieved vai ControlGetText, sends some unicode characters like- )[email protected]#$%^&*( . Why? Topic is solved

You can take a look at the content of outputvar if you convert it in hex format ,maybe some unusual bytes are there: F1:: ControlGetText, OutputVar, Edit14, A msgbox % ToHex(OutputVar) return ToHex(var){ Loop, % strlen(var)*2 byte .= format("{1:02x}",NumGet( var, A_Index - 1, "UChar" )) " " return b...
by noname
31 Dec 2017, 09:47
Forum: Ask For Help
Topic: Image Blending With Gdip Topic is solved
Replies: 3
Views: 748

Re: Image Blending With Gdip Topic is solved

You are right because i changed the xindex and yindex :?

Have a nice ending of the year :xmas:
by noname
31 Dec 2017, 09:27
Forum: Ask For Help
Topic: Image Blending With Gdip Topic is solved
Replies: 3
Views: 748

Re: Image Blending With Gdip Topic is solved

I guess you have to loop first with "height" and then the inner loop "width". You also have to start with pixel "0" A_Index start with 1 , so you need A_Index-1 in the loop. You also need the correct gdip.ahk ( if you have 32/64bit unicode ahk) This works for me: #Include *i Gdip.ahk f1:: setworking...
by noname
31 Dec 2017, 03:46
Forum: Ask For Help
Topic: What would be a better way to roll for RGB color values? (AA00FF, 272727, etc.) Topic is solved
Replies: 10
Views: 2295

Re: What would be a better way to roll for RGB color values? (AA00FF, 272727, etc.) Topic is solved

but I'd be curious to know if it's because I'm doing something wrong here Nothing wrong , but if you want to have a leading zero you can change the format string : loop 9 { Random,h,0,160 Random,l,80,120 Random,s,180,240 c%A_Index% := Format("{1:06X}", DllCall( "shlwapi\ColorHLSToRGB", UInt,h, UInt...
by noname
30 Dec 2017, 11:19
Forum: Ask For Help
Topic: What would be a better way to roll for RGB color values? (AA00FF, 272727, etc.) Topic is solved
Replies: 10
Views: 2295

Re: What would be a better way to roll for RGB color values? (AA00FF, 272727, etc.) Topic is solved

If you want only "nice" colors it is easier to use hls color values. ;DllCall( "shlwapi\ColorRGBToHLS", UInt,RGB, UIntP,h, UIntP,l, UIntP,s ) loop 100 { Random,h,0,160 Random,l,80,120 Random,s,180,240 gui,color,% Format("{1:#x}", DllCall( "shlwapi\ColorHLSToRGB", UInt,h, UInt,l, UInt,s )) Gui, show,...
by noname
30 Dec 2017, 09:28
Forum: Ask For Help
Topic: How to start Windows 10 firewall ?
Replies: 1
Views: 496

Re: How to start Windows 10 firewall ?

You need to run it with admin rights .

Code: Select all

; AllProfiles, CurrentProfile, DomainProfile, PrivateProfile, or PublicProfile

Run, *RunAs %comspec% /C netsh advfirewall set CurrentProfile state off

; or to turn on
;Run, *RunAs %comspec% /C netsh advfirewall set CurrentProfile state on
by noname
29 Dec 2017, 13:09
Forum: Ask For Help
Topic: if #IfWinActive 'xx' AND the pixel_color of this position is 123 Topic is solved
Replies: 4
Views: 1114

Re: if #IfWinActive 'xx' AND the pixel_color of this position is 123 Topic is solved

Maybe it helps using functions ,it depends on what you want to do .

example:

Code: Select all

#If  WinActive("ahk_exe abc.exe") and get_pixel(1359, 64,0x85C78B)
^a::
msgbox yes
return
#If

get_pixel(x,y,color){
PixelGetColor mycolor, x,y, RGB
if (mycolor=color)
return 1
else
return 0
}
by noname
29 Dec 2017, 02:55
Forum: Ask For Help
Topic: Clipboard multiplication small number
Replies: 1
Views: 348

Re: Clipboard multiplication small number

You can use setformat : SetFormat, FloatFast, 0.10 x := 0.0000000001 *2 MsgBox, % x There is also a high precision math library: https://raw.githubusercontent.com/aviaryan/autohotkey-scripts/master/Functions/Maths.ahk example: #include maths.ahk msgbox % SM_Multiply(0.0000000000000000005 , 0.0000000...
by noname
26 Dec 2017, 11:19
Forum: Ask For Help
Topic: Script that detects if an active window has stopped playing sound
Replies: 5
Views: 864

Re: Script that detects if an active window has stopped playing sound

You can use Kurolight's code used by HIAC , it has a function IsAudioPlaying() it returns 0 or 1. Original Kurolight code https://autohotkey.com/boards/viewtopic.php?f=5&t=40132 https://autohotkey.com/boards/viewtopic.php?f=5&t=40756&p=186032 example with tooltip: loop { tooltip % IsAudioPlaying() s...
by noname
26 Dec 2017, 07:30
Forum: Ask For Help
Topic: PixelSearch and Time count Topic is solved
Replies: 1
Views: 512

Re: PixelSearch and Time count Topic is solved

If you are looking for a color at one point you should use pixelgetcolor. documentation online : https://autohotkey.com/docs/commands/PixelGetColor.htm Here is an example : topic: PixelGetColor help (multiple color checks) https://autohotkey.com/boards/viewtopic.php?t=23306 If you still want to use ...
by noname
21 Dec 2017, 04:09
Forum: Ask For Help
Topic: Shortest code to remove word in text file Topic is solved
Replies: 3
Views: 592

Re: Shortest code to remove word in text file Topic is solved

Should you not go for the safest way?Stringreplace with "sample" would change "small pieces were sampled" .Regex would be safer as you can define it as only replace whole word matches.
by noname
19 Dec 2017, 11:06
Forum: Ask For Help
Topic: use AHK create foreign language Dictionary (how to store database)
Replies: 1
Views: 469

Re: use AHK create foreign language Dictionary (how to store database)

There is a Dictionnary Object to store and retrieve pairs : https://msdn.microsoft.com/en-us/library/x4k5wbx4 Jethrow gave an example some time ago: sd := ComObjCreate("Scripting.Dictionary") ;// Add Items sd.Add("Name", "AutoHotkey") sd.Add("Abv", "AHK") sd.Item("URL") := "www.autohotkey.com" ;// G...
by noname
17 Dec 2017, 12:26
Forum: Ask For Help
Topic: Monitor Bitcoin Price
Replies: 8
Views: 1982

Re: Monitor Bitcoin Price

https://i.imgur.com/UhemfWq.png teadrinker 's code using json parser is safer (and professional...) as syntax/format can change and regex could fail. Anyway here is regex adapted for the japanese yen values and a check if something goes wrong, i tried to make some errors and found keywords in the r...
by noname
15 Dec 2017, 12:17
Forum: Ask For Help
Topic: Record System Sounds
Replies: 3
Views: 563

Re: Record System Sounds

You have to download the zip file from www.un4seen.com : https://www.un4seen.com/download.php?bass24 and https://www.un4seen.com/download.php?basswasapi24 For sound the only way i can think of is to intercept the loudspeaker using the loopback in wasapi settings , you will find examples in the helpf...
by noname
15 Dec 2017, 12:07
Forum: Ask For Help
Topic: message when: print job is send to a printer
Replies: 7
Views: 1208

Re: message when: print job is send to a printer

https://i.imgur.com/8NMeMoL.png I guess you can just run a query when a print command is detected.Some values are not found on my system/printer :? #Persistent winmgmts := ComObjGet("winmgmts:") ComObjConnect(createSink := ComObjCreate("WbemScripting.SWbemSink"), "PrintProcessCreate_") interval := ...
by noname
15 Dec 2017, 08:44
Forum: Ask For Help
Topic: Record System Sounds
Replies: 3
Views: 563

Re: Record System Sounds

You can use bass.dll from http://www.un4seen.com/ (on win10 you can use its wasapi functions). example: https://autohotkey.com/boards/viewtopic.php?t=34352 There is a wrapper for some functions: ; Wrapper for bass.dll (2.4.5.0) ; www.autohotkey.com/forum/topic55454.html ; for AHK 1.0.48.05 ; by tora...

Go to advanced search