Sign in to follow this  
Followers 0
Nuffilein805

Save your job using AutoIT

15 posts in this topic

#1 ·  Posted (edited)

I just did some programming cause I use IE very often during work (most of the time not for work ;) ) and I thought that my favourite programming language might help me out.

The programm is very simple and it just sets the winstate of all windows with "microsoft internet" in the title to @sw_hide (+!h) and to @sw_show (+!u) just as you need it.

Maybe you can give me some feedback even if it is short.

Maybe you can use it as well in work.

I'm just thinking but implementing more window-types, some suggestions would be fine.

Maybe I could do an organizer as well for this little thing.

I think about something.

#NoTrayIcon
Opt("WinTitleMatchMode", 2)

hotkeyset("!+H", "hide")
HotKeySet("!+U", "unhide")

func hide()
    $a = WinList ("Microsoft Internet")
    for $i = 1 to $a[0][0] step 1
        If $a[$i][0] <> "" Then
            WinSetState ($a[$i][0], "", @SW_HIDE)
        EndIf
    Next
EndFunc

func unhide()
    $a = WinList ("Microsoft Internet")
    for $i = 1 to $a[0][0] step 1
        If $a[$i][0] <> "" Then
            WinSetState ($a[$i][0], "", @SW_SHOW)
        EndIf
    Next
EndFunc

while 1
    sleep (1000)
WEnd

New version uploaded: 18-10-05

savemyjob.au3

Edited by Nuffilein805

Share this post


Link to post
Share on other sites



you should probably worry more about the logging they do at the proxy..

Share this post


Link to post
Share on other sites

and i'm the networkadmin :P

that helps ;)

Share this post


Link to post
Share on other sites

So you don't think you boss will be suspicious when IE wanishes each time he glances at your screen ;)

Maybee should have a opption to lett your script swap to a "work related" IE window?

Regards

Uten

Share this post


Link to post
Share on other sites

So you don't think you boss will be suspicious when IE wanishes each time he glances at your screen

The easiest way to tell if someone is goofing off when you walk in their room is if they hit the keyboard just as you walk in. How about a script that hides all non-work related windows when it "detects" the boss coming near? Radio Shack sells an "electronic eye" that beeps when you walk in the store. The electronics can't be that tough. That way, the boss walks in and you just look up at him and smile! ;)

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites

this works

$pos = MouseGetPos()
    If $pos[0] > - 1 And $pos[0] < 12 And $pos[1] > - 1 And $pos[1] < 12 Then
        Call("Set_Hide")
    EndIf

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

FYI: If you ever use a string literal in the function Call(), you've just mis-used the function Call().

Share this post


Link to post
Share on other sites

The easiest way to tell if someone is goofing off when you walk in their room is if they hit the keyboard just as you walk in. How about a script that hides all non-work related windows when it "detects" the boss coming near? Radio Shack sells an "electronic eye" that beeps when you walk in the store. The electronics can't be that tough. That way, the boss walks in and you just look up at him and smile! ;)

Now that's an idea. Only thing is it can trigger paranoya if there are lots of folks walking about. :mad2:

How about using a web cam and some image recognition software? Something like this cool cat door

Hmm, The delights of spending countless hours of hard labor, just to be able to bee "lazy" at work :P

Regards

Uten

Share this post


Link to post
Share on other sites

Why not use a tabbed browser? Something like MyIE where you can modify the source code - then make the first tab a hotkey - you click on it - it flips over to something work related - and at the same time automatically changes the other open tabs to something specifically work related (that loads fast, like a google search, email, etc)

Share this post


Link to post
Share on other sites

Or just use the "boss key" in Maxthon (used to be MyIE2). I believe it is something like CTRL+~.


Who else would I be?

Share this post


Link to post
Share on other sites

Hi there, back to this topic. Sorry, but yesterday something strange happened and i don't have a clue how.

Somehow the windows i hid were closed. Is there a way without autoit how you can close a hidden window without knowing or recognizing it.

Maybe you can help me with this little problem. Script is still the same.

Share this post


Link to post
Share on other sites

Great ideas! Finally someone has made something useful with AutoIt (just kidding)! I like the Valuator code very much.

I suggest one be able to set a window as a panic window, so if the boss slips in, you're in a bona fide work program.

PS. Something like this is perfect for me because of the way my cubicle is located. Great!

J


If I am too verbose, just say so. You don't need to run on and on.

Share this post


Link to post
Share on other sites

As i see, somebody is using this prog i decided to add some new features.

Now as you hide all your windows are gone and 1 new comes up. I used google cause noone knows what you are doing if you're googling around (work, fun - who knows), but you can change it at whatever you like.

Here is the new code:

#NoTrayIcon
Opt("WinTitleMatchMode", 2)

hotkeyset("!+H", "hide")
HotKeySet("!+U", "unhide")

$ie = ObjCreate ("InternetExplorer.Application.1")
$lie=ObjEvent($ie,"IEEvent_","DWebBrowserEvents2") 
$ie.Visible=1
$ie.RegisterAsDropTarget = 1
$ie.RegisterAsBrowser = 1
$ie.Navigate( "http://www.google.com/" )
$ie.Visible=0

func hide()
    $a = WinList ("Microsoft Internet")
    for $i = 1 to $a[0][0] step 1
        If $a[$i][0] <> "" Then
            WinSetState ($a[$i][0], "", @SW_HIDE)
        EndIf
    Next

    $ie.Visible=1
    
EndFunc

func unhide()
    $a = WinList ("Microsoft Internet")
    for $i = 1 to $a[0][0] step 1
        If $a[$i][0] <> "" Then
            WinSetState ($a[$i][0], "", @SW_SHOW)
        EndIf
    Next
    
    $ie.Visible=0
        
EndFunc

while 1
    sleep (1000)
WEnd

I'll just update the file in the first post.

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