Sign in to follow this  
Followers 0
PhoenixXL

Vanishing Spray

5 posts in this topic

#1 ·  Posted (edited)

I was just having fun today with AutoIT

and this is what I got :)

Just try out for fun !!

#include-once
#include <WinAPI.au3>

HotKeySet("{ESC}", 'Restore') ; Set ESC as a hotkey to exit the script.
OnAutoItExitRegister('Restore')
Global $tStruct = DllStructCreate($tagPOINT) ; Create a structure that defines the point to be checked.
Global $_Restore[1]=[0]
Example()

Func Example()
Local $hWnd,$_Title

While 1
Position() ; Update the X and Y elements with the X and Y co-ordinates of the mouse.
$hWnd = _WinAPI_WindowFromPoint($tStruct) ; Retrieve the window handle.
Add($hWnd)
WinSetState($hWnd,'',@SW_HIDE)
Sleep(100)
WEnd

EndFunc ;==>Example

Func Add($hWnd)
$_Restore[0]+=1
ReDim $_Restore[$_Restore[0]+1]
$_Restore[$_Restore[0]]=$hWnd
EndFunc

Func Restore()
If $_Restore[0]=0 Then Return
For $u=1 To $_Restore[0]
WinSetState($_Restore[$u],'',@SW_SHOW)
Next
Exit
EndFunc

Func Position()
DllStructSetData($tStruct, "x", MouseGetPos(0))
DllStructSetData($tStruct, "y", MouseGetPos(1))
EndFunc ;==>Position
Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites



it would be nice to add into an array all windows previously set as hide to restore them when script exits


When the words fail... music speaks

Share this post


Link to post
Share on other sites

Done


My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Great !

I think, I am gonna use it in one of my project.

Rgds

DeltaR

Edited by deltar

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0