Jump to content

sshrum

Active Members
  • Posts

    561
  • Joined

  • Last visited

Everything posted by sshrum

  1. Understood...but given that there may be a situation where (when working with arrays of varying sizes) one may pass a $array[0] of 1 to random()... It would just be nice if it would return 1. I'm already testing for $array[0]=0 before working on the array...now I have to test for $array[0]=1 before I send it to random. If $array[0] = 1 then return 1 else return random($array[0],1,1) endif
  2. 3.2.10.0 always returns 1 3.2.11.1 always returns 0 Ok then...can we ask that a feature of the random function be that if given a range of 1,1 while requesting integers, that it return 1? I understand that with float values random will never hit the end values whenas integer call are inclusive. The reason I ask is that alot of us deal with arrays and sometimes the array will have 1 entry in it...granted I could code for and array of 1 but honestly...I feel a random # generator given a max and min of 1 should return one. just my 2 cents. Thanx
  3. This function works great until the min and max match. I'm using it like this $iNext = random(1,$aFiles[0],1) If there is only 1 entry, I'd assume that a random between 1 and 1 would return...well...1
  4. Granted for user driven interfaces, WinSCP is my tool of choice. But I need to be able to connect to a secure FTP server thru my script. I've been using the FTP UDF and that worked on my old server running plain-Jane FTP. Times are-a-changin. I was hoping for something a little less reliant on external third-party apps that I could build into the script/utility itself.
  5. My web host just upgraded servers and informed me that the new server no longer will support FTP but rather SFTP. Ergo all my scripts that I wrote with FTP no longer are able to log into the new server (they worked great with the old server but oh well). Anyone have a updated FTP UDF that can access a SFTP server? TIA
  6. Answered my own ? stringleft($sTemp, stringinstr($sTemp, @CRLF))
  7. Pulling down text via inetgetsource() so I get a large amount of data when all I need if the first line (pre-line break) I was thinking of using stringsplit and take the first array element but I don't know how much text there will be and this could take some time. TIA
  8. I'm sending my debugging statements to the Edit control but noticed that it is not moving with the new input and therefore I don't see the latest input (without manually scrolling). Is there a way to have the control go to CTRL-{END} (bottom) without having to focus on the gui and sending the keystrokes?
  9. Hehehe...no typo. You're thinking about it wrong. You're right in that 768 x 1024 is landscape. However, I'm just stating that a vertical size greater than 768 and a horizontal size greater than 1024 is recommended viewing for my site...the bigger the better. My site templates are at most 768 wide...hence the need to specify a vertical requirement. Horizontal...the skies the limit. "," != "x" Glad to see some people are checking out my site :-)
  10. I think your missing the point... The compiler at build-time is not generating the filename that I want/specify. I'm not looking for code to do a filename change...I just thought it was odd that it wasn't respecting the filename that I was passing, even though it's and executable and I'm passing a filename that does not end in '.exe'
  11. I want it to create <filename>.upd (it's still a true executable file but with my extension) but even though I specify this, I get back <filename>.exe
  12. I'm using SciTe to do my compiling so I'm not sure if this is a AutoIT compiler issue or a SciTe issue. I purposely want to compile my file and have it save as <filename>.upd, not <filename>.exe which is what is constantly being created. The reason for this is that I'm making updater files for my various projects to deal with users so they can check to see if the version they have is current and if not, download the updater file (which gets saved as <filename>.exe and then runs. The updater allows the user to do a on-the-spot update (closes the project app, downloads the newer version file, overwrites the older file, and restarts the app...ala Firefox updates). This way I can store all the related files together on my website: project.exe <- actual project file project.var <- simple text file with current version "2.01"; project queries this and if newer gets project.upd project.upd <- updater file that gets d/l'ed and renamed to update.exe on user PC I'm currently just renaming the .exe to my .upd naming format so no biggie...just thought I'd let you guys know.
  13. That sorta works (doesn't seem to see all the entries in the list). But I also found out that the list is sorting my entries alphabetically which isn't what I want (need them in the order I send them). Started using the Edit object and that seems to work more to the way I want...keeps the order and outputs 1 string on GUICTRLREAD so I can do a simple FILEWRITE of the return. thanks again.
  14. I'm writing a debug console that I can send msgs to. Basically its just a gui window with a List control. When the app closes, I'd like to save all the entries that were sent to the list to a file. When I run the GUICTRLREAD, I just get the first entry. I was hoping I'd get back a large '|' separated string of everything in the control. What do I need to do to get all the entries? TIA
  15. Just saw the @HotKeyPressed mentioned...apparently, it helps to read the help file.
  16. I'm writing a registry of hotkeys and setting the value to the command that I want it to run like this: !^#a=c:\some\command\likethis.exe I'm doing it this way so the user will have the ability to "go nuts" and create as many hotkeys as they want, including the ability to define multiple hotkeys for the same function (if they want). I'm using RegEnum to go thru the registry key where I'm storing these values and using hotkeyset() to call a secondary function I'm trying to write called _hotkeytrapper(). How do I get what hotkeys were/are being pressed so I can query that combo in the reg to do a run() on the assigned value? EDIT: This wouldn't be a issue if we could pass function calls with params with hotkeyset() Then I could do some thing like this: hotkeyset($skey, run($scommand)) TIA
  17. I've used IniReadSection() before with other projects of mine but I'm trying to place my values in the registry and low and behold, a function I thought should have existed didn't. In the meantime that this *oversight* is corrected does anyone have a way to cycle thru all the key=value pairs in a registry section? TIA
  18. Fixed it....re-installed sp3 and rebooted...things are working again. Figured one of the installs trounced on a dll or something.
  19. I have an image of the WinXP Home Edition PC just prior to having the comp lab teacher install all her reader rabbits/math blasters/etc (a lot of this stuff is pre-2000). Under that image (pre-installs), all my scripts work just fine. After the teacher installed about 50+ different CDs, when ever I launch my scripts, they crash. I thought maybe something was wrong with my scripts so I installed AutoIT on the workstations and tried to run it from the script...it's crashes before even starting: "AutoIT3Wrapper has encountered a problem and needs to close." Anyone run into this before...seems whatever it is also effects the jusched.exe (Java updater) as it also seems to crash. TIA
  20. There is no need to delete the element...set $i_Base = 1 in arraysort() to leave element 0 at the top and out of the sort
  21. I do this: In each of my scripts, I have a variable that stores my script version: $sVersion= 1.01 On my website, where I store the binary of the script, I have a file called version.txt (you can set your's up with the scriptname.ver if you want). In the script, I set it up to go to the website and read the content of the version.txt file (example): [version.txt] 1.03 Then in my script, I pull the "source" of the page and get back the current version $fCurrentVer = _InetGetSource("http://www.shrum.net/code/vistas/bin/version.txt") if $fCurrentVer > $sVersion then there is a newer version available and you can code as needed to have you app pull down the newer version. EDIT: just noticed you wrote 'intrAnet'...same idea, just filereadline() the version.txt file $fCurrentVer = FileReadLine("\\computername\share\version.txt") I think you can user UNC pathnames with that function...
  22. Do an additional ini entry but start the key off with ';' [section] key=value ;key=comment Or you can do something like this [section] key=value key-comment=value Which would look like: [defaults] restart=true restart-comment=setting this to true will cause your computer to restart Writing it like you have will make read calls for the key value return everything that is in the line which is fine if you want to have to parse the string and trim the extra off but that's extra work. I'm just saying to write 2 ini entries.
  23. I'm pretty sure that I was able to click on the 'X' (close) button before to have a msgbox dialog close but when I try it now with AutoIT 3.2.10.0 + Vista = nothing happens I wrote a script a while back that allows one to create msgbox prompts that can trigger calls to apps/batch files/etc. http://www.shrum.net/cats.php?dir=/code/prompter I just tried to 'X' a msgbox dialog but nothing happens. I did a quick test script to confirm (try clicking the 'X' on the first msgbox): $iResult = msgbox(4,"test","blah") msgbox(0,"test", $iResult) Is this a bug? If this is expected behavior, why even display the 'X'? If anything, shouldn't this trow a -1 result or a error (as it did in the past)? Seems like a bug to me. Can't say when this behavior appeared...Vista? newer builds of AutoIT?
×
×
  • Create New...