In linux bash and cmd there are operators to redirect input/output (<,>,|) and I am interested how does solve Windows API this problem. I would like to write some command in ahk to dllcommand. My need is to pass input data (image) into program. So is here anybody who can help me or to refer me on some good page?
In AutoHotkey all works trough DllCall.
For AutoHotkey_H you can use WinApi wrapper so you do not need to care about parameter types.
I watched the MSDN manual, but cannot to find the answer for redirecting input/output to application (how to call application and to pass the data to it).
I use Autohotkey L, what is the difference from Autohotkey H?
I checked the thread for Autohotkey R but I still miss some basic tutorial for start to work with it or with dllCall.
What I would like to do is to change one line in ScreenCapture.ahk to pass image to ImageMagick (convert.exe) to process it before save. See <!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?f=1&t=87063#p540435">viewtopic.php?f=1&t=87063#p540435</a><!-- l -->
BTW: You have broken link there in this post:
<!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?t=55442#p540390">viewtopic.php?t=55442#p540390</a><!-- l -->
It is the same as AHK_L + all listed features, additionally it is available as dll (for multi-threading and use in other programs).
convert.exe requires a file, how do you want to pass data to it?
Is that the link I fixed?
The fastest method would be to use conversion functions from a Dll. Those can be accessed through DllCall by AHK. You can pass a HBITMAP to a function that accepts and processes it.
Do you mean GDI+ dll or dll from ImageMagick?
I think it could be very complicated, because ImageMagick is really not simple. It is simple to write some command, but I think it would not be simple to call the inner functions separately. Also I am not expert on IM source, so cannot imaging to manage to do that.
Input condition for detection should be color of the pixels and amount of pixels in a group.
For example, if you can look on the blue bar Quick Reply. If it would be color #A67A11, the function should look for this color, and to find all pixels, that are adjacent/neighbouring. The minimum number of pixels in a group would be 8000. So the function would filter all pixels, which are not in the bar. And now would be a decision if the result should keep the original color, even with the text "Quick Reply" or to change whole bar to white, and rest of image would be black. Are there some functions or tutorials how to do something similar?
I know it is possible to save the image from screen and to change it later by ImageMagick, but IM has not this function, that is could detect amount of pixels in a group of pixels. So if there would be some solution in GDI+ or elsewhere, I would use it.