Jump to content
Sign in to follow this  
Hybrid

<<PassWord>>

Recommended Posts

Hybrid

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

Share this post


Link to post
Share on other sites
qsek

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

Share this post


Link to post
Share on other sites
Hybrid

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

Share this post


Link to post
Share on other sites
qsek

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

Share this post


Link to post
Share on other sites
xeroTechnologiesLLC

This will be a big help as a beginner also.

I live on these forums and this page a lot :

http://www.autoitscript.com/autoit3/docs/functions.htm

Hope this helps.

Share this post


Link to post
Share on other sites
AlmarM

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.

Share this post


Link to post
Share on other sites
Hybrid

Thank you AlmarM ... i fixed the sound prob... about the PW... i want to set up a password like "MadeByHybrid" or something like that...i will gave the PW to ppls which i know...so not an advanced PW...

Share this post


Link to post
Share on other sites
AlmarM

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.

Share this post


Link to post
Share on other sites
water

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 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
AlmarM

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.

Share this post


Link to post
Share on other sites
water

Don't worry :)

The recursion problem is rather hypothetical in this case.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
Hybrid

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? :)

Share this post


Link to post
Share on other sites
AlmarM

You want to play a .mp3 file thats inside a .rar?


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.

Share this post


Link to post
Share on other sites
Hybrid

yes...but the .rar will be decompiled in a specified folder....i mean whole iTest v1.1 folder will be extracted...

so after it is extracted i want to play the .mp3 from the iTest v1.1 folder...

Share this post


Link to post
Share on other sites
water

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 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
Hybrid

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

Share this post


Link to post
Share on other sites
AlmarM

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.

Share this post


Link to post
Share on other sites
water

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 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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  

×