-
Posts
56 -
Joined
-
Last visited
Profile Information
-
Location
North by North East
sias's Achievements
Wayfarer (2/7)
0
Reputation
-
HotKeySet("{", "_func") - { not being captured by HotKeySet
sias replied to sias's topic in AutoIt General Help and Support
John, Thanks for the help. I'm just glad that it wasn't just me and I'm not actually going crazy (well, in regards to this at least). Thank you for the work around, I was so caught up on trying to get the { to work with hotkeyset or even _ispressed that my brain wouldn't even let me think about other solutions. -
Good afternoon, I am having difficulties with HotKeySet when setting the hotkey as " { ". I do not see anywhere in the help file showing that this key is reserved by windows and every other key that I register appears to work. Simply put when I press the " { " key it will write " { " to whatever active program I have open as opposed to capturing the key and sending the appropriate function. Below is a short script demonstrating the issue I am having. I am using the most up to date version of Autoit and have tested the script on two separate computers so it shouldn't be due to another program already capturing that key. Does anyone know if this is a known issue with the current version of Autoit or if I am making a simple error somewhere in my script that is causing the issue. Pressing the { key will not capture { and instead just write { to the active application Pressing the } key will work and send "Works" to the console. HotKeySet("{", "_test") HotKeySet("}", "_test2") while 1 sleep (100) WEnd Func _test() ConsoleWrite ("Works") EndFunc Func _test2() ConsoleWrite ("Works") EndFunc
-
Are you looking for something like one of these? FileSaveDialog ( "title", "init dir", "filter" [, options [, "default name" [, hwnd]]] ) FileSelectFolder ( "dialog text", "root dir" [, flag [, "initial dir" [, hwnd]]] ) Or am I misunderstanding the question?
-
Help writing a simple script for a beginner
sias replied to ryan909's topic in AutoIt General Help and Support
Firstly welcome to the forum; you will find that everyone here is extremely helpful in helping you with your problems. We just ask that you post some sample code of your design, and we will help you from there. Take a look in the helpfile for timerinit() and if the link you are wanting to click is in a webpage, try some of the _IE functions. -
I didn't download your .rar file to see exactly what you were wanting, but If you are wanting to combine all three of the images, as in making them overlap. This script might help you. I did not write it, nor can I find the original post to find the author, but don't give any credit to me for it. #include <GDIPlus.au3> #include <color.au3> Global $Progress Global $TotalIterations _GDIPlus_Startup() MsgBox(64, "Introduction", "This program will combine 3 images into one image, each image seperated into its own channel" & @CRLF & _ "The first image you choose will be the template for the output image (format & size)") Local $images[3] For $i = 0 To 2 $fname = FileOpenDialog("First image", "", "All images (*.jpg;*.png;*.gif;*.bmp;)") If $fname = "" Then close() $images[$i] = _GDIPlus_ImageLoadFromFile($fname) Next Opt("GUIOnEventMode", 1) $hwnd = GUICreate("Working...", 300, 50) $progressbar = GUICtrlCreateProgress(10, 5, 280, 40) GUISetOnEvent(-3, "close") GUISetState() AdlibEnable("update", 50) CombineBitmaps($images[0], $images[1], $images[2]) $fname = FileSaveDialog("Process complete!", "", "PNG image(*.png;)|JPEG image(*.jpg;*.jpeg;)|Uncompressed Bitmap(*.bmp;)",16) If $fname = "" Then close() _GDIPlus_ImageSaveToFile($images[0], $fname) close() Func update() GUICtrlSetData($progressbar, ($Progress / $TotalIterations) * 100) EndFunc ;==>update Func close() For $i = 0 To 2 If $images[$i] <> 0 Then _GDIPlus_ImageDispose($images[$i]) Next _GDIPlus_Shutdown() Exit EndFunc ;==>close Func CombineBitmaps($bm1, $bm2, $bm3) $w = _GDIPlus_ImageGetWidth($bm1) $h = _GDIPlus_ImageGetHeight($bm1) Local $aData[$w][$h] $TotalIterations = ($w * $h) * 4 For $i = 0 To 2 Step 1 $bm = Eval("bm" & $i + 1) $w = _GDIPlus_ImageGetWidth($bm) $h = _GDIPlus_ImageGetHeight($bm) $BitmapData = _GDIPlus_BitmapLockBits($bm, 0, 0, $w, $h, $GDIP_ILMREAD, $GDIP_PXF32RGB) $Stride = DllStructGetData($BitmapData, "Stride") $Scan0 = DllStructGetData($BitmapData, "Scan0") For $row = 0 To $h - 1 For $col = 0 To $w - 1 $Progress += 1 $pixel = DllStructCreate("dword", $Scan0 + $row * $Stride + $col * 4) $temp = "0x" & Hex((DllStructGetData($pixel, 1))) $average = Hex((_ColorGetRed($temp) + _ColorGetGreen($temp) + _ColorGetBlue($temp)) / 3, 2) Switch $i Case 0 $aData[$col][$row] = BitXOR($aData[$col][$row], "0x" & $average & "0000") Case 1 $aData[$col][$row] = BitXOR($aData[$col][$row], "0x00" & $average & "00") Case 2 $aData[$col][$row] = BitXOR($aData[$col][$row], "0x0000" & $average) EndSwitch Next Next _GDIPlus_BitmapUnlockBits($bm, $BitmapData) Next $BitmapData = _GDIPlus_BitmapLockBits($bm1, 0, 0, $w, $h, $GDIP_ILMWRITE, $GDIP_PXF32RGB) $Stride = DllStructGetData($BitmapData, "Stride") $Scan0 = DllStructGetData($BitmapData, "Scan0") For $row = 0 To $h - 1 For $col = 0 To $w - 1 $Progress += 1 $pixel = DllStructCreate("dword", $Scan0 + $row * $Stride + $col * 4) DllStructSetData($pixel, 1, $aData[$col][$row]) Next Next _GDIPlus_BitmapUnlockBits($bm1, $BitmapData) EndFunc ;==>CombineBitmaps
-
Close / Stope button isnt working
sias replied to MirnesC2's topic in AutoIt General Help and Support
The color is a hexadecimal. you can use this chart for other colors Color Chart -
Have you looked into the FireFox UDF by StilGar? _FF UDF
-
start ie. in the hidden for 10 sec.
sias replied to thami's topic in AutoIt General Help and Support
for number 1. you could try something along the lines of this: #include <IE.au3> while 1 if ProcessExists("iexplore.exe") Then $IE = _IECreate("http://www.test123456") WinSetState("http://www.test123456", "", @SW_HIDE) sleep(10000) _IEQuit($IE) EndIf WEnd Of course you would need to change the WinSetState to be the title of the page once loaded (and remove the loop or add your own code in). -
I've recently had need to start a new program in order to Blur/Pixelate an area of a screen. At first I thought no problem, I can just set a small square area and draw random colored pixels on it. Well this is all easier in my mind than when I actually started on this program. Before scrapping the whole idea, I figured I would ask if anyone has ever done a project like this before, and if you could kindly show me exactly how you went about doing it. My first attempt was to modify a similar project by UEZ and his use of GDI+ in which he created a small box and drew random colored pixels within it, but because it chooses random RGB colors it didn't have an aesthetic feel to it. What I would like to do is choose only pixels colors from the area the box is on and just randomly change the location within the box I set. Thank you for any and all help you may be able to give.
-
Drawing "on top" of desktop?
sias replied to blackhydra866's topic in AutoIt General Help and Support
Does this mean I can add a "Works on His Machine" certification? -
Drawing "on top" of desktop?
sias replied to blackhydra866's topic in AutoIt General Help and Support
#include<guiconstants.au3> #include <WindowsConstants.au3> HotKeySet("^+Z", "_Exit") $maingui =guicreate("dot", 3, 3, @desktopwidth/2-1.5, @desktopheight/2-1.5, BitOR($WS_POPUP, $WS_BORDER), BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) guisetstate() WinSetOnTop("dot", "", 1) GUISetBkColor(0xffff33) while 1 sleep(100) WinSetOnTop("dot", "", 1) $msg = guigetmsg() Select Case $msg = $gui_event_close Exit EndSelect WEnd Func _Exit() Exit EndFunc ;==>_Exit I wrote this awhile back, it worked on some FPS, didn't work on others. The only true way of making one to work in every game would be to have it draw directly from the video card...Also, I am tagging it with a "Works on My Machine" cert. -
gui allways on top also in fullscreen game
sias replied to daniel02's topic in AutoIt GUI Help and Support
I attempted to write a script that placed a small dot on the screen to help with aiming in certain games. Unfortunately it didn't work in most of the games I tried as the $WS_EX_TOPMOST does not seem to work in conjunction with full screen games. Regardless, here is the script I wrote if you want to see how it is done or mess around with it. ; Dot in center of screen, and "almost" always on top #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> HotKeySet("{Escape}", "_dummy") HotKeySet("^+Z", "_Exit") $maingui =guicreate("dot", 3, 3, @desktopwidth/2-1.5, @desktopheight/2-1.5, BitOR($WS_POPUP, $WS_BORDER), BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) guisetstate() WinSetOnTop("dot", "", 1) GUISetBkColor(0xffff33) while 1 sleep(100) WinSetOnTop("dot", "", 1) $msg = guigetmsg() Select Case $msg = $gui_event_close Exit EndSelect WEnd Func _dummy() ;dummy func EndFunc Func _Exit() Exit EndFunc ;==>_Exit -
As long as the automation programs have gone under extensive testing on all platforms that it may be used on to ensure there are no errors or bugs in the program then I would back it 100%. The only problem I have with my own programs is the amount of time I invest in writing them and making them perfect...and adding tons of things to them ends up using more time than if I didn't use them.
-
Just a quick update, after a bit of further testing on Vista I did find that using {Windows Key} + D it brings the Taskbar up long enough to easily exit the script. Unfortunately the windows key can't be set to a dummy function.
-
Why exactly are you wanting to do this? What legit reason could you possibly have for wanting to crash an .exe?