Jump to content

<<PassWord>>


Hybrid
 Share

Recommended Posts

Hello Dear Comunity...

im here cuz i have 2questions

1.i have a script..with a GUI with buttons,checkboxes ... i want to create a button like *UnLock* and a input box shows up to insert a PW... after inserting the PW and pressing Enter or OK the checkboxes and buttons are deblocked...

2.I have the same script... in the following directory: iTest\iTest v1.1\

In the iTest v1.1 i have the .exe script and a folder called Sound

in Sound folder is a mp3 file (Kraddy - Android)

On my script is a button called SoundPlay when i press that button i want to sound to play...i used the func:

SoundPlay("iTest\iTest v1.1\Sound\Kraddy - Android.mp3", 1) but its not working :)...if someone can help me...

Regards~

Hybrid

Link to comment
Share on other sites

1. I dont exactly get what you want here. If you want to "deblock" (make active?) checkboxes and buttons with Ok or enter in the input field, why you need a "Unlock" Button? And where do you have a problem, disable/enable a control or make the input box?

You need to be more specific.

2. Try the full path with drive letter or use SoundPlay("iTestiTest v1.1SoundKraddy - Android.mp3", 1) as a relative specification

in both cases it would be very helpful if you post the code

Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite
Link to comment
Share on other sites

oki well... u know... im a AutoIT newbie...so if u can gimme an example...i have only 12years old..Anyway

at first question i mean:

I have a GUI...i want it to be *unactive* till u dont put the PW... the GUI have buttons and checkboxes...with UnBlock i mean if u dont put the PW in a inputbox and press OK/Enter u cannt tick/click the checkboxes/buttons

I was thinking to put a button called Unlock after clicking Unlock an input box shows up...u write the PW and press ok/enter...after that the GUI is unlocked...Sry for my bad English...P.S enabling/disabling? huh... idk what u mean :);( ;):(;):(

P.S the folder is on desktop

2.The script which i have will be on a forum and it can be downloaded...so thats why i made a folder with the .exe and the Sound folder... should i try FileInstall ? if i Put FileInstall which will be the path?

huh and relative specification means? ... sry im really nub :) huh..

Edited by Hybrid
Link to comment
Share on other sites

its no problem if you are new to autoit. I try to help you but i would like to see some efford to learn from you first :)

Making a GUI is very easy, you have a GUI Editor called Koda Form Designer. You can start it in Scite from the Tools Menu.

If you have your GUI, you can disable controls with the function GUICtrlSetState(-1, $GUI_DISABLE)

Therefore its called "disable" not "lock"

If you want information about a function, just click on it in Scite and hit F1, there you will find some examples for every function.

Also you can learn the basics with the tutorials here: http://www.autoitscript.com/wiki/Tutorials and here:

For GUI specific help, look in the Helpfile under the section "GUI Reference"

Edited by qsek
Teamspeak 3 User Viewer - Quick and functional TS3 Query script, which shows online users.Cached Screenshot Deleter - Deletes older Fraps Screenshots if they exceed a specified limit.Unresolved Topics:Intercept and modify dragdrop text behaviour in scite
Link to comment
Share on other sites

1:

How advanced to you want the password feature to be?

Like a simple hard coded password or a stored hashed password?

2:

As seen here SoundPlay("iTestiTest v1.1SoundKraddy - Android.mp3", 1), you are not completing the path.

Try this: SoundPlay(@DesktopDir & "iTestiTest v1.1SoundKraddy - Android.mp3", 1) (if the iTest directory is located on your desktop).

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

Simple as this.

_LoginBox("MadeByHybrid")

MsgBox(64, "SUCCES!", "This will only show if you enter the correct password.")

Func _LoginBox($sPassword)
    Local $sInput = InputBox("Authentication", "Please enter the correct password.", "", "*")

    If ($sInput <> $sPassword) Then
        MsgBox(16, "ERROR", "Incorrect password.")
        _LoginBox($sPassword)
    EndIf
EndFunc

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

I suggest a slightly modified version:

_LoginBox("MadeByHybrid")

MsgBox(64, "SUCCESS!", "This will only show if you enter the correct password.")

Func _LoginBox($sPassword)
    Local $sInput
    Do
        $sInput = InputBox("Authentication", "Please enter the correct password.", "", "*")
        If @error = 1 Then Exit ; Cancel button was pressed
        If $sInput <> $sPassword Then MsgBox(16, "ERROR", "Incorrect password.")
    Until $sInput = $sPassword
EndFunc

The User can click the Cancel button to leave the script. And there is no recursion in the script which could lead to a crash if the user enters a wrong password for about 5100 times :)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I suggest a slightly modified version:

_LoginBox("MadeByHybrid")

MsgBox(64, "SUCCESS!", "This will only show if you enter the correct password.")

Func _LoginBox($sPassword)
    Local $sInput
    Do
        $sInput = InputBox("Authentication", "Please enter the correct password.", "", "*")
        If @error = 1 Then Exit ; Cancel button was pressed
        If $sInput <> $sPassword Then MsgBox(16, "ERROR", "Incorrect password.")
    Until $sInput = $sPassword
EndFunc

The User can click the Cancel button to leave the script. And there is no recursion in the script which could lead to a crash if the user enters a wrong password for about 5100 times ;)

Totally forgot that! ;)

In my defense, it was a long time ago I last scripted something in AutoIt.

:)

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

Don't worry :)

The recursion problem is rather hypothetical in this case.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Tyvm guys... its working perfectly...but now i have the SoundPlay problem again :|

so i have a folder on desktop : iTestiTest v1.2Sound and the .exe script

on the GUI i have a button : "PlaySound" when i press that button i want to run the song of the Sound folder...

with the full Path its working...but the problem is :the iTest v1.2 its gonna be putted in a .rar file...so on other PC when i press SoundPlay it wont play the sound if i put the full path : PlaySound("C:................................")

So any idea how to fix it? :)

Link to comment
Share on other sites

I think he want's to tell that if a rar file (including the sound) is unpacked he doesn't know where all the files are stored and therefore can't use a absolute path.

Relative paths work too e.g. SoundPlay("..soundtest.mp3").

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I think he want's to tell that if a rar file (including the sound) is unpacked he doesn't know where all the files are stored and therefore can't use a absolute path.

Relative paths work too e.g. SoundPlay("..soundtest.mp3").

Thank you...that's what i'm looking for

Link to comment
Share on other sites

I think he want's to tell that if a rar file (including the sound) is unpacked he doesn't know where all the files are stored and therefore can't use a absolute path.

Relative paths work too e.g. SoundPlay("..soundtest.mp3").

Hah, cool. I did not know that.

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

I just noticed that

SoundPlay("Guilty.mp3", 1)
works but
SoundPlay("Guilty.mp3", 0)
(playing the sound in the background) doesn't. @error is always 0.

Anyone noticed this behaviour too?

I'm running Windows 7 64 bit and AutoIt 3.3.8.0

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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