Jump to content

Hiding, visibility and all that...


Recommended Posts

Hi evryone. Here is my script and problem:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; OVER HERE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

#cs

MY PROBLEM : READ CAREFULLY

UDVF means User Defined VF

VF means Visibility Factor

Visibility Factor is that number on end of WinSetTrans, let me show:

WinSetTrans("somename","sometext",that one==>125<== that one)

How I can hide/unhide when window is full?

It works only:

*Empty Notepad

*AutoIt help

*Firefox

I tried with this:

*Notepad (full, empty)

*AutoIt help

*Internet Explorer

*Windows media player 9 series

*FireFox

*SciTE (full!)

That is my luck. Really. And when I done this I running away from AutoIt. Just a joke.

i542, live from script.

P.S. Computer must stay in my control!

#ce

Global $visible = 255

HotKeySet("^!n","_Visible") ;ALT + CTRL + N

HotKeySet("^!m","_LessVisible") ;ALT + CTRL + M

HotKeySet("^!b","_HalfVisible") ; " " " " " + B

HotKeySet("^!j","_UDVF"); ALT + CTRL + J

HotKeySet("^!s","_Song"); " " " " " + S

Opt("TrayMenuMode",1)

$help=TrayCreateItem("Help")

$ownvisible=TrayCreateItem("Set user defined VF")

$see=TrayCreateItem("See current UDVF")

$exit=TrayCreateItem("Exit")

While 1

$msg=TrayGetMsg()

Select

Case $msg = $help

MsgBox(64,"Help","For help please read 'readme.txt' file.") ;heh...it will be included when I publish it, nothing importrant

Case $msg = $exit

Exit

Case $msg = $ownvisible

$visible=InputBox("User defined VF","Enter VF value. Maximum is 255 (solid) and minimum 0 (invisible).")

If $visible < 0 OR $visible > 255 OR @error OR StringIsDigit($visible) = 0 Then

MsgBox(16,"UDVF","You are enter unknown value or canceled. Try again.")

$visible = 255

EndIf

Case $msg = $see

MsgBox(64,"Current UDVF","Your current UDVF is "& $visible & ".")

EndSelect

WEnd

Func _Visible()

;In full and hided Notepad Window or other window it does - NOTHING!

WinSetTrans(WinGetTitle(""),WinGetText(""),255)

TrayTip("Window is solid","Current window is solid.",1)

EndFunc

Func _LessVisible()

;In full and visible Notepad or other window it does - NOTHING!

WinSetTrans(WinGetTitle(""),WinGetText(""),30)

EndFunc

Func _HalfVisible()

;In full and visible Notepad or other window it does - NOTHING!

WinSetTrans(WinGetTitle(""),WinGetText(""),176)

EndFunc

Func _UDVF()

;In full and visible Notepad or other window it does - NOTHING!

WinSetTrans(WinGetTitle(""),WinGetText(""),$visible)

TrayTip("UDVF","Current window's VF is "& $visible & " out of maximum 255.",1)

EndFunc

Func _Song()

;Without tray commands, hotkeysets and working in empty Notepad it only works :D

$open=FileOpenDialog("Play song",@MyDocumentsDir,"MP3 files (*.mp3)")

SoundPlay($open)

TrayTip("Now playing","Now playing: " & $open & ".",1)

EndFunc

;I really need your help.......

So, as I say, I can't hide when is something full! :D

Lucky Luke,

i542

P.S. Help me quickly, please!

EDIT: No one don't want help me?

Edited by i542

I can do signature me.

Link to comment
Share on other sites

This works for me with Notepad full size or small size

HotKeySet("{ESC}", "Terminate")
HotKeySet("!d", "DOD1") ;Alt-d
HotKeySet("!c", "DOD2") ;Alt-c

While 1
    Sleep(100)
WEnd

Func DOD1()
WinSetTrans("Untitled - ", "", 0); Make Notepad window semi-transparent.
EndFunc

Func DOD2()
WinSetTrans("Untitled - ", "", 255); Make Notepad window semi-transparent.
EndFunc

Func Terminate()
    Exit 0
EndFunc


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

  • 3 weeks later...

This works for me with Notepad full size or small size

That's cool! Here's my mod, which makes a fade out of it. Interesting demo of one function interrupting another if you hit alt-i to fade in, and then hit alt-o to fade out when it's about half way there.

If Not WinExists("Untitled - ") Then Run("Notepad.exe")
WinWait("Untitled - ")
HotKeySet("{ESC}", "Terminate")
HotKeySet("!i", "DOD1") ;Alt-i = Fade IN
HotKeySet("!o", "DOD2") ;Alt-o = Fade OUT

While 1
    Sleep(100)
WEnd

Func DOD1()
    For $t = 0 To 255
        WinSetTrans("Untitled - ", "", $t)
        Sleep(10)
    Next
EndFunc   ;==>DOD1

Func DOD2()
    For $t = 255 To 0 Step - 1
        WinSetTrans("Untitled - ", "", $t)
        Sleep(10)
    Next
EndFunc   ;==>DOD2

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...