CyberFunk Productions
Active Members-
Posts
66 -
Joined
-
Last visited
CyberFunk Productions's Achievements
Wayfarer (2/7)
0
Reputation
-
While loop not there?
CyberFunk Productions replied to CyberFunk Productions's topic in AutoIt GUI Help and Support
LMAO, wow, dumb mistake, thanks for the help. -
i get an error when i run this program that says there is now while for the Wend but there is. Here is the code #include <GUIConstants.au3> #include <Array.au3> #Controls GUICreate("My GUI", 600, 350) $exitButton = GUICtrlCreateButton("Exit", 256, 304, 80, 30) $findButton = GUICtrlCreateButton("Find", 32, 28, 80, 30) $element = GUICtrlCreateinput("", 120, 28, 100, 30) GUISetState (@SW_SHOW) Running() Func Running() While 1 $msg = GUIGetMsg() Select Case $msg = $exitButton Exit Case $msg = $findButton Find() End Select Wend EndFunc ...
-
whats the best way to place controls in a gui. I've just been guessing and checking the co-ordinates but that takes a long time. I also tried using Autoit window info but it doesn't give me the co-ordinates inside my gui window. I also tried using CyberSlugs autobuilder but its not compatible with the new version of auto it. Suggestions?
-
I made this script a while ago in my spare time. What it does is it password protects folders on your computer. It asks for a user name and password. How it works is that if the name of the folder you want to protect is opened it hidesn it then asks for a user name and password. If either is rejects the window closes and you have to try again. I know what your thinking, just change the name of the file and you can easily get passed it. But thats not the case. i have windows xp pro and when you try to change the name of the file it will give an error saying that another program is using it or it will actually ask you for the user and pass and if you enter the wrong one it freezes that window(or the desktop depending on where the file is). The first version i made you had to hard code the user pass and name of folder. I also made a version where it reads the data from an ini file but that is less secure. If you put the file in the folder your protecting then theres no way anyone can delete it while its running either. The only way that i found you can get around it is if your know what the exe is called(i made it so you can call it whatever you want to trick people) and its stopped with ctr-alt-del.(shows up in processes tab). or if you delete the reg entry(i made it so its starts when your comp starts up) and then restart the computer. Just want to know what people think and if there are any ways of improving it. Its not perfect and never will be. Its just an easy way to protect documents on your computer from other family members and such. Anyway enjoy! this is the hard code version #Shift-Alt-q HotKeySet("+!q", "Close") #call startup Start() Func Start() Opt("TrayIconHide",1) $regVal = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName) if $regVal = 1 OR -1 OR -2 Then RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName, "REG_SZ", @ScriptDir) EndIf Loop() EndFunc Func Loop() Do $x = WinExists ( "Ryan" ) Until $x = 1 WinSetState ( "Ryan", "", @SW_HIDE) Password() EndFunc Func Password() $user = InputBox ( "User", "Please enter user name","", "*" ) If $user = "user" Then $pass = InputBox( "Password", "Please enter password", "", "*") If $pass = "pass" Then MsgBox( 1, "Accepted", "Password and user name accepted!", 30) WinSetState ( "Ryan", "", @SW_SHOW) keepOpen() Else WinClose ( "Ryan" ) MsgBox( 1, "Rejected!", "Password rejected!", 5) keepOpen() EndIf Else WinClose ( "Ryan" ) MsgBox( 1, "Rejected!", "User name rejected!", 5) keepOpen() EndIf EndFunc Func keepOpen() Do $x = WinExists ( "Ryan" ) Until $x = 0 Loop() EndFunc Func Close() Exit 0 EndFunc this is the version with the ini Global $fileName #Shift-Alt-q HotKeySet("+!q", "Close") If FileExists("Data.ini") = 0 Then IniWrite("Data.ini", "Data", "UserName", "user") IniWrite("Data.ini", "Data", "PassWord", "pass") IniWrite("Data.ini", "Data", "FileName", "Ryan") Restart() Else $fileName = IniRead("Data.ini", "Data", "FileName", "not") Start() EndIf Func Start() Opt("TrayIconHide",1) $regVal = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName) if $regVal = 1 OR -1 OR -2 Then RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName, "REG_SZ", @ScriptDir) EndIf Loop() EndFunc Func Loop() If $fileName = "not" Then MsgBox(1, "Error:1", "No file name in data.ini!! Shutting Down... ", 3) Else Do $x = WinExists ( $fileName ) Until $x = 1 WinSetState ( $fileName, "", @SW_HIDE) Password() EndIf EndFunc Func Password() $userIni = IniRead("Data.ini", "Data", "UserName", "not") $passIni = IniRead("Data.ini", "Data", "PassWord", "not") If $userIni = "" OR "not" Then WinClose($fileName) MsgBox(1, "Error:2", "No password to match in Data.ini! Shutting Down...", 3) Else If $passIni = "" OR "not" Then WinClose($fileName) MsgBox(1, "Error:3", "No password to match in Data.ini! Shutting Down...", 3) Else $user = InputBox ( "User", "Please enter user name","", "*" ) If $user = $userIni Then $pass = InputBox( "Password", "Please enter password", "", "*") If $pass = $passIni Then MsgBox( 1, "Accepted", "Password and user name accepted!", 30) WinSetState ( $fileName, "", @SW_SHOW) keepOpen() Else WinClose ( $fileName ) MsgBox( 1, "Rejected!", "Password rejected!", 5) keepOpen() EndIf Else WinClose ( $fileName ) MsgBox( 1, "Rejected!", "User name rejected!", 5) keepOpen() EndIf EndIf EndIf EndFunc Func keepOpen() Do $x = WinExists ( $fileName ) Until $x = 0 Loop() EndFunc Func Restart() MsgBox(1, "Restart", "Please restart the program after configuring settings.", 3) Exit 0 EndFunc Func Close() Exit 0 EndFunc
-
search program
CyberFunk Productions replied to CyberFunk Productions's topic in AutoIt General Help and Support
wow, thanks for the help. All those programs do what i want. -
a long time ago in the beggining stages of v3 someone made a program with auto-it that can search through any dir(like c:\) and find a file name with a certain extention. I think it was more then a year ago, maby 2. I don't remember the users name but he had a picture of mr.clean as an avatar. If anyone remembers this or knows of a similar program please let me know.
-
Client -2- Server Side Scripting
CyberFunk Productions replied to PerryRaptor's topic in AutoIt Example Scripts
LMFAO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -
Run script on startup?
CyberFunk Productions replied to SweatyOgre's topic in AutoIt General Help and Support
hey SweatyOgre, i've done this b4, heres a really easy example. RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"..., ^^^^This part is the path to the registry run folder. "Program X",... ^^^ this is the name of your registry entry "REG_SZ",... ^^^This is your registry type(leave as is) "C:\Program X\ProgramX.exe") ^^^and finally this is the path to the file you want to run at start-up in the end it should look like it does below: RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Program X", "REG_SZ", "C:\Program X\ProgramX.exe") Also look in the help file under writing registry keys hope that helps you out. -
delete self
CyberFunk Productions replied to CyberFunk Productions's topic in AutoIt General Help and Support
hmmm...i guess i didin't look hard enough, thanx. -
i need code that makes a batch script that will delete my program after it closes, i think there was an example a really long time ago but i can't find it in the search.
-
um, you should include a readme and tell me why this program has to connect to the internet, i don't like letting strange programs connect through my firewall. plus i think this should go under scripts and scraps...
-
parsing
CyberFunk Productions replied to CyberFunk Productions's topic in AutoIt General Help and Support
wow, thats awsome, thanx, i'll work with this. It makes more sense now. -
i really don't understand how to parse files. Heres what i want to do. lets say I want to parse a text file and look for the word 'birthday', then display what line its on, is this possible?, and how would i go about doing it, i've read up on a little but i don't get it.
-
windows
CyberFunk Productions replied to CyberFunk Productions's topic in AutoIt General Help and Support
right, my bad, i'll take a look at it -
windows
CyberFunk Productions replied to CyberFunk Productions's topic in AutoIt General Help and Support
yes you should b/c this method is a little complicated. The thing i don't understand is hw to get the text of the active window, without doing it manually?