Paulie Posted October 8, 2006 Posted October 8, 2006 I am making a program that has a page of rules I have all the rules typed in a .txt file and am reading the file and setting that as an edit control in my GUI with the '$ES_READONLY' style so it can be scrolled I want to put in some mechanism to at least try to motivate people to read the rules before pushing ok, and my idea is making it so the scroll in the edit box has to be all of the way down or at least has been all the way down once(as it would be if they read the entire thing) before the ok button becomes enabled Like some of those installers that make you have to scroll all the way to the bottom of the license agreement before you can click ok Any ideas?
Xenobiologist Posted October 8, 2006 Posted October 8, 2006 Hi, did you already start? So that testing is a bit easier using your code. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Vindicator209 Posted October 8, 2006 Posted October 8, 2006 (edited) well, what I usually do for this stuff us is to put a little password near, but not AT the bottom of the rules page, and under the "next" button (or whatever) have a small input box, so if people dont read it, they wont be able to go to the next page(or whatever) OR Have the "Next" button(or whatever) be disabled, untill that password is entered, but it makes no difference, the first one just makes it tricky.. though it not really an inscript mechanism, it works! EDIT: oh, nvm i didnt know you wanted the scroll bar at the bottom... Edited October 8, 2006 by MethodZero [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]
Valuater Posted October 8, 2006 Posted October 8, 2006 (edited) in your text add something like "bla..bla acceptance code = " GetIP()... ( or something ) then next to the OK button have an input box that has to have that code pasted/typed into it before the button can be activated ....... just an idea 8) ... guess i was a little slow... but we had the same idea/concept Edited October 8, 2006 by Valuater
Paulie Posted October 8, 2006 Author Posted October 8, 2006 (edited) Hi, did you already start? So that testing is a bit easier using your code. So long, MegaWell i threw together a dummy code similar to my own without all the 'fileread' garbage as that is irrelevant, and though the gui on my other one is much cleaner, this has the same controls #include <GUIConstants.au3> $Gui = GUICreate("Rules", 400, 600,-1,-1, "", BitOr($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) $Info = GUICtrlCreateLabel("You must read the following rules before continuing:", 10, 10, 380, 50) GUICtrlSetFont($info, 14, 500, 0, "Arial") $Edit = GUICtrlCreateEdit("Rules that were imported from other test file here.", 10, 100, 380, 350, $ES_READONLY) GUICtrlSetBkColor($Edit, 0xFFFFFF) $Next = GUICtrlCreateButton("&Next", 100, 475, 80, 30) $Exit =GUICtrlCreateButton("&Exit", 220, 475, 80, 30) GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case $Exit Exit Case Else Sleep(100) EndSwitch WEnd As for the little password thing, that would be a little too much work, tough it would be cool to put it randomly in the information and have it so you can't just scroll to the bottom but you actually need to read it to find the code But i like the scroll thing better, because though i want them to read the rules, i know I'd be angry if i had to copy and past a password just to push ok. The scroll isn't that bad Plus it would be a useful wrapper for someone who was making an installer with a license agreement. Does anyone have any idea on the scroll thing? EDIT: forgot to attach code Edited October 8, 2006 by Paulie
Helge Posted October 8, 2006 Posted October 8, 2006 I asked Gary the GUI-guru the same question a while ago in this post.I tried what he suggested and I couldn't get it working either.
Paulie Posted October 8, 2006 Author Posted October 8, 2006 (edited) I asked Gary the GUI-guru the same question a while ago in this post.I tried what he suggested and I couldn't get it working either.So does this mean its not possible? I mean if gafrost can't help me...I'm gonna need a miracle Edited October 8, 2006 by Paulie
cppman Posted October 9, 2006 Posted October 9, 2006 (edited) This is'nt really the most advanced way of doing things.. but it works To get the number i compared it to... do, MsgBox(0, "", _GUICtrlEditGetFirstVisibleLine($EditControl)) oÝ÷ Ù§íz¼¨º¯zÇ+¢Y^u©e¶°k+h¶¢Ûh:ò¶¬9÷(º»r§è¶¨º¹bè§Æµ§!éí as for the scrollbar being there when it is "readonly".. i've got no clue on that.Readme.txt Edited October 9, 2006 by CHRIS95219 Miva OS Project
jinxter Posted October 9, 2006 Posted October 9, 2006 (edited) Works like a charm... try this for a readonly with vertical scroll, remember that line 51 is not at the end if you do... it's somewhere in the middle. more like line 238 $Edit1 = GUICtrlCreateEdit("", 8, 8, 321, 241,$ES_READONLY+$WS_VSCROLL) Edited October 9, 2006 by jinxter > there are 10 types of people in the world, those who understand binary and those who don't.
i386 Posted October 9, 2006 Posted October 9, 2006 (edited) Change line 16 to have a '>' sign instead of the '==' signs instead. Ex: #include <GUIConstants.au3> #include <GUIEdit.au3> #Region ### START Koda GUI section ### Form= $data = FIleOpen("readme.txt", 0) $count = StringLen(FileRead($data)) $Form1 = GUICreate("AForm1", 336, 338, 193, 115) $Edit1 = GUICtrlCreateEdit("", 8, 8, 321, 241,$ES_READONLY+$WS_VSCROLL) GUICtrlSetData($Edit1, FileRead($data)) FileCLose($data) $Button1 = GUICtrlCreateButton("The Easy Button", 8, 256, 321, 73) ControlDisable($Form1, "The Easy Button", $Button1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 ;51 if (_GUICtrlEditGetFirstVisibleLine($Edit1) > 51) Then ControlEnable($Form1, "The Easy Button", $Button1) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _Cont() EndSwitch WEnd Func _Cont() MsgBox(0, "", "You may continue!") EndFunc Edited October 9, 2006 by terrabyte Spoiler "...Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like.My crime is that of outsmarting you, something that you will never forgive me for." --The Mentor "Mess with the best, die like the rest!!" -Hackers "This above all to thine own self be true." -William Shakespeare "Corruption is only as corrupted as the individual makes it out to be." -i386
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now