AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

RUS really useful stuff

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
shadowreaper



Joined: 03 Oct 2008
Posts: 5

PostPosted: Fri Oct 03, 2008 7:25 pm    Post subject: RUS really useful stuff Reply with quote

my pet project to create an app to run portable software it works and has a few other features

Code:

#SingleInstance

gui01 = 0
gui02 = 0
DetectHiddenWindows, On
SplitPath, A_WorkingDir ,,,,, DriveLet


IniRead, Direc, apps.ini, wall, dir, \wallpaper

ifexist %DriveLet%%Direc%
{
   ArrayCount = -1
   loop %DriveLet%%Direc%\*.bmp, 0, 0
   {
      ArrayCount += 1 
      Array%ArrayCount% := A_LoopFileFullPath
   }
   Random, z , 0, %ArrayCount%
   element := Array%z%
   DllCall("SystemParametersInfo", UInt, 0x14, UInt, 0, Str, element, UInt, 2)
}
Loop, Read, autorun.lst
   run %A_LoopReadLine%

   

DriveSpaceFree, freespace, %DriveLet%
DriveGet, cap, capacity, %drivelet%

Gui, Add, Edit, x66 y60 w260 h20 Vappto, edit
Gui, Add, Text, x6 y10 w320 h30 , Type the name of a program`, folder`, document`, or Internet resource`, and RUS will open it for you.
Gui, Add, Text, x10 y62 w36 h16 , &Open:
Gui, Add, Button, x96 y130 w70 h23 gRun Default, OK
Gui, Add, Button, x176 y130 w70 h23 gCancel, Cancel
Gui, Add, Button, x256 y130 w70 h23 gShort, Short
Gui, Add, Picture, x336 y10 w157 h157, %A_WorkingDir%\RUS.PNG
Gui, Add, Text, x171 y90 w70 h20 , Free Space:
Gui, Add, Text, x241 y90 w90 h20 , %freespace% / %cap% MB
Gui, Add, Progress, x166 y110 w160 h10 Range0-%cap%  BackgroundRed cGreen, %freespace%

Gui, 2:Add, ListBox,vMyListBox gMyListBox x16 y30 w120 h320 Sort +\, MyListBox
Gui, 2:Add, Edit, vApppath x146 y40 w310 h20 ,
Gui, 2:Add, Text, x16 y10 w120 h20 , Apps Found On Drive:
Gui, 2:Add, Text, x146 y10 w310 h20 , Relitive Path To Selected App:
Gui, 2:Add, Text, x146 y70 w310 h20 , Your Short:
Gui, 2:Add, Edit, vShort x146 y100 w310 h20 , short
Gui, 2:Add, Text, x146 y140 w310 h180 , Guide It May take Some Time To Refresh The APP PATH FIELD
Gui, 2:Add, Button, gShort2 x356 y330 w100 h20 , short
Gui, 2:Add, Button, x236 y330 w100 h20 gAutoRun, AutoRun
loop \*.exe, 1, 1
GuiControl,2:, MyListBox, %A_LoopFileName%

#e::
{
   if gui02 = 0
   {
      Gui, 2:Show,, Really Useful Stuff Short Cut Editor
      gui02 = 1
   }
   else
   {
      Gui, 2:hide
      gui02 = 0
   }
}

Return

#r::
{
   if gui01 = 0
   {
      GuiControl, Text, appto,
      GuiControl, Focus, appto
      Gui, Show,, Really Useful Stuff
      gui01 = 1
   }
   else
   {
      Gui, hide
      gui01 = 0
   }
}

return

#t::
if not DllCall("IsWindowVisible", "Uint", WinExist("ahk_class Progman"))
{
   WinShow
}
else
{
   WinHide
}
return


#c::
{
   Random, z , 0, %ArrayCount%
   element := Array%z%
   DllCall("SystemParametersInfo", UInt, 0x14, UInt, 0, Str, element, UInt, 2)
}
return

Short:
GuiControlGet, appto,
inputBox short,What Short Cut Do You Wish To Asign?,,,,100,,,,,
IniWrite, %Appto%, apps.ini, apps, %short%
Gui, hide
gui01 = 0
return
Run:
GuiControlGet, appto,
IniRead, path, apps.ini, apps, %Appto%
run %path%,, UseErrorLevel
   if errorlevel = ERROR
      Run, %Appto%,, UseErrorLevel
Gui, hide
gui01 = 0
return
Cancel:
Gui, hide
gui01 = 0
GuiClose:
Gui, hide
gui01 = 0
return

MyListBox:
   if A_GuiEvent <> DoubleClick
         GuiControlGet, MyListBox, 2:
         loop \%MyListBox%, 1, 1
            GuiControl, 2:Text, Apppath, %A_LoopFileFullPath%
      return
return
short2:
GuiControlGet, Apppath, 2:
GuiControlGet, Short, 2:
   IniWrite, %Apppath%, apps.ini, apps, %short%
return
AutoRun:
GuiControlGet, Apppath, 2:
FileAppend,
(

%Apppath%
), autorun.lst
return
2GuiClose:
Gui, 2:hide
gui02 = 0
return


the apps .ini file

Code:
[apps]


[wall]
dir=\



and the not so good read me!

REALLY USEFUL STUFF
----- | | /-----/
| | | | |
| | | | |
----- | | \-----\
| \ | | |
| \ | | |
| \ \-----/ /-----/

V0.7 (+ a bit)

-----------------------
I. INFO

Really Useful Stuff is hopefully what it says on
the tin... useful it is an application that offers
a quick way to run you applications on your PC or
USB using simple customisible command that can be as
long or as short as you want.

It is fully portable and uses relitive paths for apps
can accept command lines for apps to run and best of
all the source code is included... There IS NO WARRANTY
i can accept no responsiblity for any damage this app may
cause you can do with the source code as you please as long
as you inform me and give me a copy of your altered code if you
intend to publish it. i am a bit nosie and like to see how
my code has been used ^_^

-----------------------
II.
HotKeys For Main Features
WindowsKey
+ E
Displays RUS Short Cut And Auto RUN creator
this is a simple part of the program that
allows you to create a short cut for one
of the exe's at the side or any folder or
website you like
Exe's displayed in the list pane are those
located on the drive RUS is.
All Paths Are Relive
R
Displays The Runsection of the application
this is pretty much self explanitory
T
Hide's Desktop Icons ON/OFF
mainly used to show your own background on
certain PC's where they wont display ... HA
C
Randomly changes the wallpaper of your pc

wallpaper directory place in apps.ini where dir=\
path must be relive and contain bmps

end of read me so far
lol

png that needs to go in the director is my avatar name it rus.png

hope fully show off a few neat features of ahk[/img]
_________________
i am what i excel tobe myself question is what are you?
Back to top
View user's profile Send private message MSN Messenger
shadowreaper



Joined: 03 Oct 2008
Posts: 5

PostPosted: Fri Oct 03, 2008 7:27 pm    Post subject: Reply with quote

just noticed cant change avatar you should delete the line of code that mentions it sorry
_________________
i am what i excel tobe myself question is what are you?
Back to top
View user's profile Send private message MSN Messenger
shadowreaper



Joined: 03 Oct 2008
Posts: 5

PostPosted: Fri Oct 03, 2008 7:35 pm    Post subject: Reply with quote

not intending to spam but could you suggest other useful features for this that are not only usefull but show off autohothey's full potential, i want to prove to some one its pretty much a programming language
_________________
i am what i excel tobe myself question is what are you?
Back to top
View user's profile Send private message MSN Messenger
HotKeyIt



Joined: 18 Jun 2008
Posts: 230
Location: GERMANY

PostPosted: Sat Oct 04, 2008 4:18 pm    Post subject: Reply with quote

Hi shadowreaper, i have written somthing simmilar, if you like have a try.
Possibly you find some usefull stuff, like automatic hotstrings.
AutoHotFile
_________________
AutoHotFile
Back to top
View user's profile Send private message
netfun81



Joined: 28 Oct 2006
Posts: 20

PostPosted: Fri Oct 10, 2008 2:59 am    Post subject: Reply with quote

Nice Script. I have a couple suggestions for it.

1. Allow other image formats, like jpg for wallpapers

2. Allow searching for an executable in the Win-E form. The list is long to scroll, i would like to type in a few letters and jump to the executable from the left list

3. How about an option to choose your hotkeys?

4. How about a way to remove shortcuts and autoruns that have been previouly setup?
Back to top
View user's profile Send private message
shadowreaper



Joined: 03 Oct 2008
Posts: 5

PostPosted: Fri Oct 10, 2008 7:37 am    Post subject: Reply with quote

Quote:
1. Allow other image formats, like jpg for wallpapers


not sure how to do this with out using another program ... the dllcall way of changing the wallpaper rests after you logoff so it leaves no evidence of the wallpaper change well no obvious ines any way

Quote:
2. Allow searching for an executable in the Win-E form. The list is long to scroll, i would like to type in a few letters and jump to the executable from the left list


Coming soon

Quote:
3. How about an option to choose your hotkeys?


didn't think i'll work on it see what i come up with

Quote:
4. How about a way to remove shortcuts and autoruns that have been previouly setup?


should be in next version (V.07 + alot more)

forgot to mention

all parts of my code are in modules if you like just a certain bit i will gladly send you the module
_________________
i am what i excel tobe myself question is what are you?
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group