
egalvez
Active Members-
Posts
49 -
Joined
-
Last visited
Everything posted by egalvez
-
Can't get dialog to change to $WS_EX_TOPMOST
egalvez replied to egalvez's topic in AutoIt General Help and Support
Thank you, SerialKiller. That works well with the menuitem. -
Can't get dialog to change to $WS_EX_TOPMOST
egalvez replied to egalvez's topic in AutoIt General Help and Support
Thank you, but if I'm not mistaken, your code will make the dialog topmost from its inception. I only want the dialog to be topmost when the user clicks an Always On Top menuitem. I want to be able to change the topmost setting on the fly, depending on whether or not the Always on Top menuitem has a checkmark next to it or not. Forgive me, please, if I'm missing something with your code. -
Hello. I'm having trouble with a menu item that should allow the user to make the GUI window always on top. Here are my relevant code snippets. What am I doing wrong, please? $mcGui = GuiCreate("Verse Quizzer - Multiple Choice", 480, 340,-1,-1,-1,-1) .... $MenuOptionsAlwaysOnTopItem = GUICtrlCreateMenuitem ("&Always on Top",$MenuOptions) GUICtrlSetOnEvent($MenuOptionsAlwaysOnTopItem, "MenuOptionsAlwaysOnTopClicked") .... Func MenuOptionsAlwaysOnTopClicked() If IniRead ( "config.txt", "Settings", "AlwaysOnTop", "NotFound" ) = "1" Then;ALWAYSONTOP IS ON, LET'S TURN IT OFF GUICtrlSetState($MenuOptionsAlwaysOnTopItem,$GUI_UNCHECKED) IniWrite ( "config.txt", "Settings", "AlwaysOnTop", "0" ) Else;ALWAYSONTOP IS OFF, LET'S TURN IT ON GUICtrlSetState($MenuOptionsAlwaysOnTopItem,$GUI_CHECKED) IniWrite ( "config.txt", "Settings", "AlwaysOnTop", "1" ) GUICtrlSetStyle ( $mcGui,$WS_EX_TOPMOST ) GUISetState () EndIf EndFunc I'm obviously doing something wrong. I did search the forums on $WS_EX_TOPMOST but still don't know how to resolve this. Please advise. By the way, I'm using Opt("GUIOnEventMode", 1)
-
Testing what's typed in an edit control
egalvez replied to egalvez's topic in AutoIt General Help and Support
It broke again, but this time I was having to type especially extremely fast and it took longer to break. It took 10-15 seconds to break it, which was longer than before. I'm attaching another screencap. Looks like the same error. Thank you. -
Testing what's typed in an edit control
egalvez replied to egalvez's topic in AutoIt General Help and Support
I got pretty much the same error this time, although no characters beyond the correct number. I'm attaching a screencap. Keep in mind I'm trying to break this, but I can't imagine that in any normal situation anyone would, so I'm not really worried about it. And I thank you for your efforts. -
Testing what's typed in an edit control
egalvez replied to egalvez's topic in AutoIt General Help and Support
Thanks, Raindancer. This time it broke differently. Here's the error: Note: I'm not using a beta version of AutoIt3. So, I just commented out the Beep line in your code since that's a beta-only feature. I figure everything else should work fine, though. -
Testing what's typed in an edit control
egalvez replied to egalvez's topic in AutoIt General Help and Support
Since gafrost's code apparently is for comboboxes, does that mean it's not helpful in this situation. or is it a question of my modifying it to work with an edit control (if I can)? Actually, Raindancer's code may very well suffice. I only was able to break it because I was trying to, i.e., I was letting my fingers fly all over the keyboard with a rapidity that no user would ever have reason to do. -
Testing what's typed in an edit control
egalvez replied to egalvez's topic in AutoIt General Help and Support
Thanks, Raindancer. It seemed to work fine, but allowed incorrect characters at the end (see screencap). I'll also check out the posts that ronsrules recommended. Thank you, folks. -
Hello. Let's say my dialog box displays a question: Who was the first president of the United States? and there's an edit control where the user can type in a response. I want to be able to test the user's response character-for-character while he's typing. So, if he types George, great, he can continue typing, but as soon as he gets a character wrong, the incorrect character is stripped from the edit control and no new character will appear until the correct next character is typed. So, if he types George B, the B is removed and a beep sounds and the user knows the next character must not be a B, while George W would be allowed. When I did this kind of thing using Excel VBA, it was easy. I just attached a macro to the edit control. I can't figure out how to do that in AutoIt3, however. I tried using GUICtrlSetOnEvent with an edit control, but that apparently is only for when a control is clicked, not typed in. How would I go about doing this, please?
-
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
FYI: Using wOuter's code in conjunction with the latest AutoIt3 beta worked very well. Thank you. -
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
OK, thank you for that clarification. I'll try that. -
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
I thought I was using your script. You pasted code in a code window or an iFrame or whatever kind of box it was and I used it, right? I pointed out two errors that I got when I tried to execute it. You provided one fix, and someone else provided another potential fix for the second error, which didn't work. Please advise. -
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
I downloaded and installed the latest AutoIt beta, but what am I looking for, please? I searched for FtpGetFile and didn't find anything. I searced on ftp and didn't find anything helpful. I looked at InetGet and it's the same as in the official release. So, why did you recommend that I download the newest beta, please? Did you have something specific in mind? -
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
I'll download the latest AutoIt beta. Thank you. I appreciate the kindness and helpfulness of those who contribute to these forums. -
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
Doing so resulted in this error: I'd like to do that, but beta of what and where do I get what you're referring to? I went to the w0uter's _FTP ( NEW ) link and saw a page of functions that did not seem to involve downloading via FTP, unless perhaps I was missing something. -
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
OK, I changed False to 0. Now I get a different error: -
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
Thank you for the code. Unfortunately, when I tried it out, I got this error: Did I copy and paste that line wrongly somehow? -
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
I took the FtpPutFile function from this post and tried to hack it to turn it into an FtpGetFile function, but it's not working because I don't really know what I'm doing. I'm wondering if someone who does know what they're doing could help me, please. Here's what I've got: ; Access types for InternetOpen() Global $INTERNET_OPEN_TYPE_PRECONFIG = 0 Global $INTERNET_OPEN_TYPE_DIRECT = 1 Global $INTERNET_OPEN_TYPE_PROXY = 3 Global $INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY = 4 ; Service types for InternetConnect() Global $INTERNET_SERVICE_FTP = 1 Global $INTERNET_SERVICE_GOPHER = 2 Global $INTERNET_SERVICE_HTTP = 3 Global $INTERNET_DEFAULT_FTP_PORT = 21 Global $INTERNET_FLAG_ASYNC = 0x10000000 Global $INTERNET_FLAG_PASSIVE = 0x08000000 Global $FTP_TRANSFER_TYPE_UNKNOWN = 0x00000000 Global $FTP_TRANSFER_TYPE_ASCII = 0x00000001 Global $FTP_TRANSFER_TYPE_BINARY = 0x00000002 Dim $nRetCode Func _FtpGetFile($sServer, $sUserName, $sPassword, $sRemoteFile, $sNewFile, $bFailIfExists, $hFlagsAndAttributes, $nType = 0, $nPassive = 1) Local $hWininet Local $hInternet Local $hConnect Local $aDllRet Local $nRet = 0 $hWininet = DllOpen("wininet.dll") If $hWininet = -1 Then Return $nRet $aDllRet = DllCall($hWininet, "ptr", "InternetOpen", _ "str", "AutoITFTPUDF", _ "long", $INTERNET_OPEN_TYPE_DIRECT, _ "int", 0, _ "int", 0, _ "long", $INTERNET_FLAG_ASYNC) If Not @error And $aDllRet[0] <> 0 Then $hInternet = $aDllRet[0] If $nPassive Then $nPassive = $INTERNET_FLAG_PASSIVE Else $nPassive = 0 EndIf $aDllRet = DllCall($hWininet, "ptr", "InternetConnect", _ "ptr", $hInternet, _ "str", $sServer, _ "long", $INTERNET_DEFAULT_FTP_PORT, _ "str", $sUserName, _ "str", $sPassword, _ "long", $INTERNET_SERVICE_FTP, _ "long", $nPassive, _ "int", 0) If Not @error And $aDllRet[0] <> 0 Then $hConnect = $aDllRet[0] $aDllRet = DllCall($hWininet, "int", "FtpGetFile", _ "ptr", $hConnect, _ "str", $sRemoteFile, _ "str", $sNewFile, _ "bool", $bFailIfExists, _ "str", $hFlagsAndAttributes, _ "long", $nType, _ "int", 0) If Not @error Or $aDllRet[0] <> 0 Then $nRet = -1 Else $aDllRet = DllCall("kernel32.dll", "long", "GetLastError") If Not @error Then $nRet = $aDllRet[0] EndIf ; Send QUIT command to ftp server $aDllRet = DllCall($hWininet, "int", "FtpCommand", _ "ptr", $hConnect, _ "int", 0, _ "long", $FTP_TRANSFER_TYPE_ASCII, _ "str", "QUIT", _ "int", 0, _ "int", 0) DllCall($hWininet, "int", "InternetCloseHandle", "ptr", $hConnect) EndIf DllCall($hWininet, "int", "InternetCloseHandle", "ptr", $hInternet) EndIf DllClose($hWininet) Return $nRet EndFunc $nRetCode = _FtpGetFile("11.22.33.44", _ "myusername", _ "mypassword", _ "public_html/folder/file.txt", _ "c:\file.txt", _ "FALSE", _ "", _ $FTP_TRANSFER_TYPE_ASCII, 0) if $nRetCode <> -1 Then msgbox(4112,"FtpGetFile test","Download of file was NOT successful") Else msgbox(4160,"FtpGetFile test","Download of file WAS successful") EndIf -
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
I give up for now. If I get it working, I'll reply again. Thank you. -
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
OK, I found info on FtpGetFile on this MSDN page. Please tell me: to pull this off in AutoIt3, will I need to use all three dllCall, dllOpen, and dllClose functions? -
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
OK, here's what I see for Remote Site when I make the cgi-bin folder the current directory: /public_html/cgi-bin/ I hope that's what you mean. And thank you for your patience with me. -
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
When I see the word path, as opposed to URL, I think of the actual server path, which would be:/home/account/public_html/cgi-bin/folder/file.log if that's what you mean I know about the ftpputfile function already, so I had already searched for what I figured would be a sister function (ftpgetfile) and didn't find anything at all in the help file or in the AutoIt3 forums, so I'm not sure what you're referring to. I'm trying to stay within AutoIt's functionality here, as opposed to doing a Google and finding some third-party tool. -
How to download a file from a CGI-BIN folder
egalvez replied to egalvez's topic in AutoIt General Help and Support
I've tried these four kinds of InetGets: InetGet("ftp://username:password@hostIP/cgi-bin/folder/file.log", "C:\file.log")InetGet("ftp://username:password@ftp.mysite.com/public_html/cgi-bin/folder/file.log", "C:\file.log")InetGet("ftp://username:password@hostIP/public_html/cgi-bin/folder/file.log", "C:\file.log")InetGet("ftp://username:password@mysite.com/cgi-bin/folder/file.log", "C:\file.log")..all to no avail. -
Hello. I want to download a text file that's in a cgi-bin folder and am not sure the best way to do this. I know how to use InetGet to download files that aren't in cgi-bin folders, and I know how to use the _FtpPutFile function to upload files via FTP, but how can I use FTP to download a file from a protected cgi-bin folder? It's easy to do with my FTP client (FileZilla), so I'm assuming there must be a way to do it with AutoIt3. I did read the InetGet help, but couldn't figure out how to apply it to this situation. When I tried a normal InetGet, a file did download, but it was just a 500.shtml file (the custom 500 Internal Server Error page I made for the site). Please advise.
-
Disabling Network Neighborhood icon
egalvez replied to egalvez's topic in AutoIt General Help and Support
Actually, I have a good friend who has his own business where he builds and repairs PCs, installs and troubleshoots networks, etc. I was with him a couple days ago and he was having a hard time hiding the Network Neighborhood icon ona few Win98 PCs. I've been wanting to recommend AutoIt3 to him and I thought if it could be used to hide (I mistakenly said disable in my original post) the Network Neighborhood icon, he might develop some interest in AutoIt. I suspect he'll develop interest in it anyway.