Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

<<PassWord>>


  • Please log in to reply
70 replies to this topic

#1 Hybrid

Hybrid

    Wayfarer

  • Active Members
  • Pip
  • 61 posts

Posted 19 February 2012 - 01:56 PM

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







#2 qsek

qsek

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 256 posts

Posted 19 February 2012 - 02:08 PM

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

#3 Hybrid

Hybrid

    Wayfarer

  • Active Members
  • Pip
  • 61 posts

Posted 19 February 2012 - 02:30 PM

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, 19 February 2012 - 02:32 PM.


#4 qsek

qsek

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 256 posts

Posted 19 February 2012 - 02:56 PM

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: http://www.autoitscript.com/forum/topic/127054-absolute-beginners/

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

Edited by qsek, 19 February 2012 - 03:02 PM.

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

#5 xeroTechnologiesLLC

xeroTechnologiesLLC

    Prodigy

  • Active Members
  • PipPipPip
  • 158 posts

Posted 19 February 2012 - 04:54 PM

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.

#6 AlmarM

AlmarM

    Programming my way.

  • Active Members
  • PipPipPipPipPipPip
  • 1,694 posts

Posted 20 February 2012 - 08:40 AM

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, 20 February 2012 - 08:41 AM.

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.


#7 Hybrid

Hybrid

    Wayfarer

  • Active Members
  • Pip
  • 61 posts

Posted 20 February 2012 - 12:01 PM

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

#8 AlmarM

AlmarM

    Programming my way.

  • Active Members
  • PipPipPipPipPipPip
  • 1,694 posts

Posted 20 February 2012 - 12:15 PM

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.


#9 water

water

    ?

  • MVPs
  • 15,572 posts

Posted 20 February 2012 - 12:36 PM

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 :)
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#10 AlmarM

AlmarM

    Programming my way.

  • Active Members
  • PipPipPipPipPipPip
  • 1,694 posts

Posted 20 February 2012 - 12:47 PM

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! ;)

Spoiler

Edited by AlmarM, 20 February 2012 - 12:48 PM.

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.


#11 water

water

    ?

  • MVPs
  • 15,572 posts

Posted 20 February 2012 - 12:50 PM

Don't worry :)
The recursion problem is rather hypothetical in this case.
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#12 Hybrid

Hybrid

    Wayfarer

  • Active Members
  • Pip
  • 61 posts

Posted 20 February 2012 - 01:28 PM

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

#13 AlmarM

AlmarM

    Programming my way.

  • Active Members
  • PipPipPipPipPipPip
  • 1,694 posts

Posted 20 February 2012 - 01:35 PM

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.


#14 Hybrid

Hybrid

    Wayfarer

  • Active Members
  • Pip
  • 61 posts

Posted 20 February 2012 - 01:37 PM

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

#15 Hybrid

Hybrid

    Wayfarer

  • Active Members
  • Pip
  • 61 posts

Posted 20 February 2012 - 01:37 PM

i think that's a thingy with FileInstall?

#16 water

water

    ?

  • MVPs
  • 15,572 posts

Posted 20 February 2012 - 01:38 PM

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").
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#17 Hybrid

Hybrid

    Wayfarer

  • Active Members
  • Pip
  • 61 posts

Posted 20 February 2012 - 01:39 PM

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

#18 Hybrid

Hybrid

    Wayfarer

  • Active Members
  • Pip
  • 61 posts

Posted 20 February 2012 - 01:41 PM

TYVM !!! It's working !!!

#19 AlmarM

AlmarM

    Programming my way.

  • Active Members
  • PipPipPipPipPipPip
  • 1,694 posts

Posted 20 February 2012 - 01:45 PM

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.


#20 water

water

    ?

  • MVPs
  • 15,572 posts

Posted 20 February 2012 - 01:46 PM

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, 20 February 2012 - 01:47 PM.

UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users