
Genos
Active Members-
Posts
20 -
Joined
-
Last visited
Everything posted by Genos
-
How to use / do multiple flags? [SOLVED]
Genos replied to miketh2005's topic in AutoIt General Help and Support
Yes, please leave the topic name as the original. It helps other people who come to the forums and search for problems like their own. If it just says [solved] they don't know what this topic is about, or what has been solved >_ -
How can I Set Focus to an input box?
Genos replied to Genos's topic in AutoIt General Help and Support
Great! Thanks for explaining that. >_ -
How can I Set Focus to an input box?
Genos replied to Genos's topic in AutoIt General Help and Support
I am not able to figure out how to use _WinAPI_SetFocus to set focus to my inputbox >_< _WinAPI_SetFocus($txtQuestion) Doesn't set focus to my input box. -
Yeah, I'm not having any luck finding information on setting the focus. All I need it to put the cursor into the top input box of my form after I submit the data. I know there has to be something simple out there, but I can't find it >_<
-
After a quick glance at the help file, I didn't see it in there either. I actually just looked at the options that Koda gave me for checkboxes, and the multiline option was one of them. >_<
-
GOTO Not Needed (v2 to v3 question)
Genos replied to EddardStark's topic in AutoIt General Help and Support
Yes, using Switch/Case is a much prettier option, and will benefit you in the long run. When you come back to read your code it will be easier to understand >_ -
I copy/pasted that, and it works for me. #include <GUIConstantsEx.au3> GUICreate("My GUI Button") $check = GUICtrlCreateCheckbox("CHECKBOX 1", 10, 10, 120, 20) $Button_1 = GUICtrlCreateButton("Display Value", 10, 30, 100) GUISetState() While 1 $msg = GUIGetMsg() if $msg = $Button_1 then POPUP() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Func POPUP() If GUICtrlRead($check) = $GUI_CHECKED Then $var2=1 Else $var2=0 Endif msgbox(0,"Yep",$var2) EndFunc that's just slopped together, but if you click the button with the box unchecked, you will get 0, with it checked you will get 1
-
GOTO Not Needed (v2 to v3 question)
Genos replied to EddardStark's topic in AutoIt General Help and Support
It looks like you are just trying to use a function, if so you can just call that function and let it execute the function. Try something like this: If %AOSVERSION% = "Windows_2000" THEN WIN2k() If %AOSVERSION% = "Windows_XP" THEN WINXP(). Func WIN2K() If %other vairable% = "xyz" THEN WIN2KXYZ() FileReadLine, script1, %logonserver%\\\\netlogon\\\\LoginScripts.txt, 1 (Etc - Other commands for this subsection) EndFunc -
When you create the textbox, you must set a flag to allow multiline. Try this: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $main_gui=GUICreate('test',500,500) GUICtrlCreateCheckbox('Accetto il contratto di licenza e i termini del servizio di ciascun sito (visitare ciascun sito per conoscere il contratto di licenza e i termini del servizio',10,140,480,40,BitOR($BS_CHECKBOX,$BS_AUTOCHECKBOX,$BS_MULTILINE,$WS_TABSTOP)) GUISetState(@SW_SHOW,$main_gui) While 1 $m=GUIGetMsg() Select Case $m=$GUI_EVENT_CLOSE Exit EndSelect WEnd The $BS_MULTILINE flag is what allows multiple lines. Also, you may want to check out the Koda GUI Designer for autoit here: http://koda.darkhost.ru/page.php?id=download. It's helped me a lot with these type of things!
-
While 1 ;Do this an infinite number of times ##Put all your code here## Wend This will do whatever you put in the while loop an infinite number of times. You should put some sort of an exit strategy in there too though.
-
Writing Japanese characters to a file
Genos replied to Genos's topic in AutoIt General Help and Support
Thanks, I appreciate the help. After running your code and seeing that it worked great (thanks!), I decided to check my method of obtaining the data from the listbox. Using _GUICtrlListBox_GetText($lstQuestion,$i) would result in reading ?? (verified by creating a popup with the data obtained from GetText). So I have found a workaround by using FileWriteLine($saveFile, "ans" & $i +1 & " = " & guictrlread($lstAnswer,1)) The only problem with this is that I have to set each item to selected using _guictrllistbox_setcursel($lstAnswer, $i) but it now reads, writes, and displays the japanese font. Thanks for your help >_< -
Yes, making $BossMod_Checkbox into an array should accomplish what you're wanting.
-
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $lstYourList ;If they click on your listbox do the following: $selected = _GUICtrlListBox_GetCurSel($lstYourLIst) ; Retrieve the index of the currently selected item $picFileName = _GUICtrlListBox_GetText($lstYourList,$selected) ; Returns the item (string) at the specified index ###Put your code here to do what you want with the picture### EndSwitch Wend That will grab the text in the list box and assign it to $picFileName and you can do what you want with the file name.
-
You should be able to get rid of $Paused = NOT $Paused While $Paused sleep(100) That should solve your problem.
-
Firefox and IE: different matches with PixelGetcolor
Genos replied to Rambo's topic in AutoIt General Help and Support
I've noticed a lot of differences between the two, mostly from how they handle html. I wouldn't be surprised to find slight difference in color as well >_ -
Could you just put the file in the startup folder and let windows execute it automatically when they login?
-
try using "Return" instead of "Exit" Exit will close the program, return will exit the function, normally with a value
-
Writing Japanese characters to a file
Genos replied to Genos's topic in AutoIt General Help and Support
Ok, so in ScITE I did File -> Endoding -> UCS2-Little Endian, and used $saveFile = FileOpen ( $saveFilePath, 34 ) This did not work for me. Is this what you were recommending or did I do something else wrong? thanks again in advance. -
Writing Japanese characters to a file
Genos replied to Genos's topic in AutoIt General Help and Support
Thanks for the response. I don't know what you mean by "Switching SciTE to UCS-2 Little Endian". How would I do this? -
I'm attempting to take user input and write that input into a file. The input includes japanese characters, but when I view the file the japanese text shows up only as ?s. Is there a way to store japanese characters? global $saveFilePath = FileSaveDialog("Save File", "", "Fcards deck (*.fcd)",2) & ".fcd" $saveFile = FileOpen ( $saveFilePath, 130 ) FileWriteLine($saveFile, "[Program Information]") FileWriteLine($saveFile, "Title = " & GUICtrlRead($txtTitle, 1)) FileWriteLine($saveFile, "Description = " & GUICtrlRead($txtDescription, 1)) FileWriteLine($saveFile, "Author = " & GUICtrlRead($txtAuthor, 1)) FileWriteLine($saveFile, "Version = " & GUICtrlRead($txtVersion, 1)) FileWriteLine($saveFile, "WebSite = " & GUICtrlRead($txtWebSite, 1)) FileWriteLine($saveFile, "") FileWriteLine($saveFile, "[Vocab]") $count = _GUICtrlListBox_GetCount($lstQuestion) $i = 0 while $i < $count FileWriteLine($saveFile, "que" & $i +1 & " = " & _GUICtrlListBox_GetText($lstQuestion,$i)) FileWriteLine($saveFile, "ans" & $i +1 & " = " & _GUICtrlListBox_GetText($lstAnswer,$i)) $i += 1 WEnd The Result is: [Program Information] Title = Japanese Numbers Description = Japanese Numbers, 1-100. Hiragana Author = Genos Version = 1.0 WebSite = http:// [Vocab] que1 = 1 ans1 = ?? que1 = 2 ans1 = ? que1 = 3 ans1 = ?? que1 = 4 ans1 = ?? que1 = 5 ans1 = ? que1 = 6 ans1 = ?? que1 = 7 ans1 = ?? que1 = 8 ans1 = ?? que1 = 9 ans1 = ??? que1 = 10 ans1 = ??? The ?? should be いち に さん etc.. I have tried opening the file in UTF8 and just regularly, but can't get it to show correctly in the file. Is there anyway for me to have AutoIt store japanese characters in a file using FileWriteLine()? Thanks in advance for your help.