Sign in to follow this  
Followers 0
SlimShady

Script Ideas...

69 posts in this topic

I'm bored. I scripted everything I wanted to script and I don't know what to create next.

So, any ideas?

Share this post


Link to post
Share on other sites



I could use a search with input box that shows the search in a list box not a popup msg . do the au3 for me so I can see how it is done .

:D

Share this post


Link to post
Share on other sites

@SlimShady: Do you use your scripts at work?

If so why don't you ask your colleagues if they have problems to solve which you maybe can solve with scripts?...hmmm...

No ideas...at the moment I have enough to script - tools that make some things easier for me at work :D

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I could use a search with input box that shows the search in a list box not a popup msg . do the au3 for me so I can see how it is done .

:huh2:

Good idea. I will do that.

@SlimShady: Do you use your scripts at work?

If so why don't you ask your colleagues if they have problems to solve which you maybe can solve with scripts?...hmmm...

No ideas...at the moment I have enough to script - tools that make some things easier for me at work  :D

I'm an intern at a Servicedesk. And I only have adult colleagues.

I assume they're all smarter than me and don't need my help.

But I will ask 'em.

And, no I don't have scripts that I use at work.

Scripts I've made were all made for 'home-use'.

Edited by SlimShady

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I could use a search with input box that shows the search in a list box not a popup msg . do the au3 for me so I can see how it is done .

:D

Done! Click here for the script.

For your information, here's the Gui code I used:

Opt ("GUICoordMode", 1)
Opt ("GUINotifyMode", 1)
GUICreate("File Search", 344, 273, (@DesktopHeight - 344) / 2, (@DesktopHeight - 273) / 2, 0x04CF0000)

$ResultList = GUISetControl("list", "ResultList", 10, 10, 210, 250)
$CopyResult = GUISetControl("button", "Copy Filepath", 230, 20, 100, 30)
$Gotofile = GUISetControl("button", "Locate File", 230, 70, 100, 30)
$StartResult = GUISetControl("button", "Run File", 230, 120, 100, 30)
$ListLines = ""

GUIShow()
$msg = GUIMsg(0)
While $msg <> -3
   $msg = GUIMsg(0)
   Select
      Case $msg = $Gotofile
         $File = GUIRead($ResultList)
         
         Run("explorer.exe /select," & Chr(34) & $File & Chr(34))
         
      Case $msg = $StartResult
         $File = FileGetShortName(GUIRead($ResultList))
         RunWait(@ComSpec & " /c Start " & $File, "", @SW_HIDE)
         
      Case $msg = $CopyResult
         ClipPut(GUIRead($ResultList))
         
   EndSelect
   Sleep(1000)
Wend

And to update the listbox:

GUISetControlData($ResultList, "text")
Edited by SlimShady

Share this post


Link to post
Share on other sites

How about a startup manager, I have been meaning to give this a go myself, but am really busy at moment.

A set of radio buttons with a countdown (so you can walk off and let it default to a set of programs) would be nice

Cheers

Steve

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Can you give an example of how you want it to look visually?

You mean a standalone startup manager that doesn't touch the existing startup locations (registry, start menu), right?

Edited by SlimShady

Share this post


Link to post
Share on other sites

Well, It's been said before but I dont think anyone has done it. A script that downloads files from MSN messages, IE, your at school(me :huh2:) or work, and you can just send a URL, and good old AutoIt will download it for you :D. I'd have a go myself but I'm still at the 'noob' level :)

Moja

Share this post


Link to post
Share on other sites

How about a startup manager

#15254

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

bored? A useful script?

Look this interesting project

  :D

Wow! Too difficult for me......

@pekster: No-one made a startup manager in that topic.

I'm working on that right now but I'm stuck.

I would like to loop through all the radio buttons until it finds one that's been clicked on (checked).

Can you post some sample scripts that contain radio buttons so I can learn.

Here's what I have so far:

Opt ("GUICoordMode", 1)
Opt ("GUINotifyMode", 1)
GUICreate("StartupManager", 500, 350, (@DesktopHeight - 500) / 2, (@DesktopHeight - 350) / 2, 0x04CF0000)

$ShowList = GUISetControl("list", "ShowList", 125, 10, 275, 300)

$AddItem = GUISetControl("button", "Add Items", 415, 20, 75, 20)
$EditItem = GUISetControl("button", "Edit Item", 415, 45, 75, 20)
$DelItem = GUISetControl("button", "Del Item", 415, 70, 75, 20)

GUISetControl( "group", "GroupCats", 5, 0, 115, 195)
$ChooseCat1 = GUISetControl("radio", "ChooseCat1", 10, 15, 100, 10)
$ChooseCat2 = GUISetControl("radio", "ChooseCat2", 10, 30, 100, 10)
$ChooseCat3 = GUISetControl("radio", "ChooseCat3", 10, 45, 100, 10)
$ChooseCat4 = GUISetControl("radio", "ChooseCat4", 10, 60, 100, 10)
$ChooseCat5 = GUISetControl("radio", "ChooseCat5", 10, 75, 100, 10)
$ChooseCat6 = GUISetControl("radio", "ChooseCat6", 10, 90, 100, 10)
$ChooseCat7 = GUISetControl("radio", "ChooseCat7", 10, 105, 100, 10)
$ChooseCat8 = GUISetControl("radio", "ChooseCat8", 10, 120, 100, 10)
$ChooseCat9 = GUISetControl("radio", "ChooseCat9", 10, 135, 100, 10)
$ChooseCat10 = GUISetControl("radio", "ChooseCat10", 10, 150, 100, 10)
$ChooseCat11 = GUISetControl("radio", "ChooseCat11", 10, 165, 100, 10)
$ChooseCat12 = GUISetControl("radio", "ChooseCat12", 10, 180, 100, 10)

GUIShow()

Global $OldState = ""

$msg = GUIMsg(0)
While $msg <> -3
  $msg = GUIMsg(0)

   For $i = 1 To 12
     $NewState = "$ChooseCat" & $i
     $CheckCat = Eval("ChooseCat" & $i)
     If $CheckCat = $msg Then ExitLoop
   Next

     If GUIRead($msg) = 4 Then

           MsgBox(0, "Test", "Selected: " & $NewState)
           $OldState = $NewState

     EndIf

  Sleep(1000)
Wend

Thank you for your time.

PS: How can I choose a radio button using the arrow keys?

Share this post


Link to post
Share on other sites

I know no one made one, but it depends on the purpose of the manager. If it's to see how you would make an effective startup manager with AutoIt, then all the more power to you. However, if someone just wanted the ability to, say, add some compiled AutoIt scripts to the relevant startup registeries, that StartupCPL program would work fine.


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

Wouldn't you want to test the result of the GuiRead() with a bitwise AND function? If I understand correctally how the state table works, more than one can be active at any given time. Since you are only testing for the state of 4, it could only be unchecked and have no other paramaters marked. What about

If BitAND(GUIRead($msg), 4) = 4 Then;stuff
?


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Wouldn't you want to test the result of the GuiRead() with a bitwise AND function?  If I understand correctally how the state table works, more than one can be active at any given time.  Since you are only testing for the state of 4, it could only be unchecked and have no other paramaters marked.  What about

If BitAND(GUIRead($msg), 4) = 4 Then;stuff
?
First I want to know which radio button has been clicked on.

After that I tell the script which radio button has been clicked on:

If GUIRead($msg) = 4 Then ........

BTW: I don't understand much of that BitAND, I will try to understand....

Edited by SlimShady

Share this post


Link to post
Share on other sites

Let's say, for example, that I take your script and wish to hide and show these radio buttons based on some other information. The state is now no longer 4 when it is unchecked and shown, because 4 (for unchecked) + 16 (for GUI_SHOW) become 20. You'll notice all the states listed in the table are powers of two. In binay we have 1, 10, 100, 1000, and so on. A bitwise AND function compares two binary numbers bit by bit, and returns only a 1 if both corresponding bits in the two numbers being compared are 1. In the case of the state of unchecked (the number 4, or 100 in binary) we can use a bitwise AND. Example:

A state of 20 (see above) is 10100 in binary. When we use BitAnd(20, 4) we end up comparing 10100 and 100. The only bit that is a 1 in both of them is the 4's place. Therefore, it will return 4. Essentially the BitAND() function in my example asks "is the 4's bit set in the $msg variable?" and will not be messed up by other potential states that could be set at the same time as a state 4.


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Let's say, for example, that I take your script and wish to hide and show these radio buttons based on some other information.  The state is now no longer 4 when it is unchecked and shown, because 4 (for unchecked) + 16 (for GUI_SHOW) become 20.  You'll notice all the states listed in the table are powers of two.  In binay we have 1, 10, 100, 1000, and so on.  A bitwise AND function compares two binary numbers bit by bit, and returns only a 1 if both corresponding bits in the two numbers being compared are 1.  In the case of the state of unchecked (the number 4, or 100 in binary) we can use a bitwise AND.  Example:

A state of 20 (see above) is 10100 in binary.  When we use BitAnd(20, 4) we end up comparing 10100 and 100.  The only bit that is a 1 in both of them is the 4's place.  Therefore, it will return 4.  Essentially the BitAND() function in my example asks "is the 4's bit set in the $msg variable?" and will not be messed up by other potential states that could be set at the same time as a state 4.

I will keep this in mind.

I don't want to be rude but you didn't solve my problem.

The problem is below and I would like to solve it.

For $i = 1 To 12
    $NewState = "$ChooseCat" & $i
    $CheckCat = Eval("ChooseCat" & $i)
    If $CheckCat = $msg Then ExitLoop
  Next

I'll explain what I want.

I know that if I click on a random radio button, the GUIMsg(0) is set.

Script knows which radio button it was. But I as a scriptwriter would like to know (identify) which radio button it was.

In the above code I tried to match $ChooseCat$i with the GuiMsg (where $i is 1 to 12). If it matches, I would have $NewState that contains the name of the radio button so I can use it.

But it doesn't work. How do I make it work?

Edited by SlimShady

Share this post


Link to post
Share on other sites

Well, It's been said before but I dont think anyone has done it. A script that downloads files from MSN messages, IE, your at school(me :huh2:) or work, and you can just send a URL, and good old AutoIt will download it for you :D. I'd have a go myself but I'm still at the 'noob' level :)

Moja

If you used AIM, i could help you out.

-Brett

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

Anybody have another easy, noob-make-able script idea for me? I think there should be another Main Section on this, just for people who are bored...

Edited by brett

-Brett

Share this post


Link to post
Share on other sites

I would like to see if au3 can split files and then put them back ? can it do that ?

Share this post


Link to post
Share on other sites

I have one for you.

I would like to see something like this.

A script that continually opens and closes a website and logs how long it takes in variables. It then creates a running average of the last 100 load times and compairs that time to the difference of the current load time. If the current load time goes 50% higher then the running average it sends a netsend to the admin.

Also it would be nice if it displays the current time and running average in a Splash Text window.

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