Jump to content

Save your job using AutoIT


Nuffilein805
 Share

Recommended Posts

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
Link to comment
Share on other sites

Well, actually they do no logging at the proxy cause everyone uses the same user and i'm the networkadmin ;) , so i don't worry about that

It's just for the reason when your boss is standing right behind ya and you don't want him to see that your in the autoitforum

Link to comment
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

Link to comment
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
Link to comment
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

Link to comment
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)

Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
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.

Link to comment
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.

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...