Jump to content

JohnWPB

Members
  • Posts

    17
  • Joined

  • Last visited

JohnWPB's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. The only downfall of this method, would be the need to replace the BT-Suppository device after each large meal..... LOL (Sorry for the "thread back from the dead", found it doing a finger print scanner AI code Google search)
  2. very nice smartee! I already incorporated the code by taietel, so I will save yours to my "tool box" and use it in the future for sure! I am not a programmer, and I usually muddly my way through what I am trying to do. I have it working now, and do not want to mess with it haha. Luckily, this is something that will be used rarely, and only have about 20 items in the array, so not a big deal with memory & CPU ect. Thanks for all the help guys!
  3. @Smartee Reading up on ReDim, seems similar to having to do the for loops and such, as it states when ReDim'd it must remain the same size or the data will be lost. @taietel Wow, that's perfect! Uses the loops and such, but far cleaner than I could have pieced it together for sure Thanks much!
  4. I had a feeling that was going to be the response Ok, is there a workaround of any kind that someone can think of? Even if I can insert a single row, I can easily add the second column's values. I basically just need to bump everything else down the list at the insertion point. EDIT: Thinking on this more, that wouldnt help, as the 2nd column would not be "bumped down" and the columns would be all out of sync, even if it could be done in some way) I am trying to avoid: Finding the spot to insert, reading before that into a new array with a for loop finding the next line after it, and adding it to yet another array with a for loop adding my new data to the end of the first array then combining the two new array's back into sequence using another loop with ubound of the first loop, the second loop.......... Thats a lot of work, and not very clean code to say the least! Hahaha
  5. Guess I replied just as you saw the "Look in the help file"
  6. This should do it: $file = FileRead("D:\Script\script.au3") $result = StringInStr($file, "String To Find") if $result then MsgBox(0, "Found it", "Found it at character position: " & $result) Else MsgBox(0, 'Not Found', "String Not Found") EndIf
  7. Ok, I can not seem to figure out the syntax for the life of me on how to insert into an existing array, if the array has more than a single dimension / column. I have tried variants that would seem to make "code sense" and can not seem to peg it down. Any help is greatly appreciated! Here is a simple test script from the help file, altered a bit to make it 2 dimensional. If I can get it to insert in here, I can easily modify it for my script: Thanks in advance for the help! #include <Array.au3> Local $NamesArray[10][10] $NamesArray[0][0] = "Jim" $NamesArray[0][1] = "test Jim" $NamesArray[1][0] = "Frank" $NamesArray[1][1] = "test Frank" $NamesArray[2][0] = "John" $NamesArray[2][1] = "test John" $NamesArray[3][0] = "Larry" $NamesArray[3][1] = "test Larry" _ArrayDisplay($NamesArray, "$NamesArray BEFORE _ArrayInsert()") ;This is the single dimensional array insert from the help file: _ArrayInsert($NamesArray, 2, "New") ;~ I am trying to insert it into the correct dimension / column _ArrayInsert($NamesArray[2][1],"New") ;~ _ArrayInsert($NamesArray,[2][1], "New") _ArrayDisplay($NamesArray, "$NamesArray AFTER _ArrayInsert()")
  8. No ideas here on how to auto click the "Allow" button?
  9. Ok, reviving an old thread here, sorry First off... FANTASTIC work on this! I had been trying to figure a way to authenticate with Twitter, since the old version no longer works. I have this working fairly well in the application I am working on. My script has a receiver function that allows SendMsg commands, and does away with the GUI all together. This is being done to integrate with a CarPC front End, Ride Runner. When done it will allow tweets to be sent by using the On Screen Keyboard, as well as buttons to tweet your location ect ect. The only thing I can not overcome is the having to click the "Allow" button for the authentication. It would appear that they may have changed the code on the site on how the form is submitted. I tried different examples in the AI Help documentation, as well as searching the here on the AI forums with no avail. I did find that where the "_IEAction($submit, "click")" command is located, seems to be before the authentication form loads. I have moved it down in the script lower in the code, and added a _IELoadWait($twitter) so the form fully loads on the screen before trying to click something. _IENavigate($twitter, "https://twitter.com/oauth/authorize?oauth_token=" & $oauth_token) _IELoadWait($twitter) if $hide_token_authetication = True Then GUICtrlSetState($twitter_ctrl, $GUI_SHOW) sleep(500) $form = _IEFormGetObjByName($twitter, "request") $submit = _IEFormElementGetObjByName($form, "Allow") _IEAction($submit, "click") ;~ _IELinkClickByText ($twitter, "Allow") As you can see, I also tested the IELinkClickByText command which seems to be of no help. I just can not seem to get this to auto click the "Allow" on the page. Any help here would be greatly appreciated!
  10. A nice simple quick fix, thanks, worked perfectly!
  11. Same problem here, so I can answer that question The problem is the installer does not seem to be parsing and comparing the version number correctly. I have the latest release installed, and not the beta. I completely removed all traces of AI, installed the latest released version, and again tried the library installer with the same results: As you can see, the error is stating you need at least 3.2.4.9 and currently installed is 3.2.6.0
  12. Thank you so much! I knew it was just some sort of syntax problem! The 2nd example above worked perfectly!
  13. Hello all you AI guru's! I am having a problem passing info to a home automation program called Home Seer. I have read through the help files, and just can not seem to get the syntax correct. I know it has to be something simple, but it seems to be a problem with passing multiple commands on a single line, in the way the quotes or parentheses are formatted. First I opened communication with Home Seer with the following line: $hs = ObjCreate("homeseer.application") I then can get the status of a device, and the msg box show that correctly with the following lines: $MyDevice = $hs.devicestatus("A3") if $MyDevice = 3 then $MyStatus = "Off" if $MyDevice = 2 then $MyStatus = "On" if $MyDevice = 4 then $MyStatus = "Dimmed" MsgBox(0, "Status", $MyStatus) so far all is working to communicate with Home Seer to get the status of a device. The following line I am trying with AI is not working (The ExecX10 is a command Home Seer recognizes to execute a command, as you can see below that the VBscript using the same command, and it works perfectly): if $MyDevice = 3 then hs.execX10 "A3", "On" , 50 The following line, in VBscript works perfectly: if MyDevice = 3 then hs.execX10 "A3", "On" , 50 I have tried all sorts of variations with placing quotes and parentheses with no luck. Any help with the proper syntax is greatly appreciated, as I know it is something simple with the syntax that I am doing wrong here.
  14. With this problem, it is not necessary to give the TOTAL source to the script here. This is a single line, that needs NO other code to work correctly. I can post the rest of the script, and that is NO problem, but would just be much harder to follow with all the additional code. The bottom line is that the following line DOES NOT WORK: DirCopy("c:\Music\temp", "C:\MP3", 1) Using the above, I get a copy of the INDIVIDUAL files in c:\Music\Temp placed into c:\MP3 Resulting in: c:\MP3 xx1.mp3 xx2.mp3 xx3.mp3 It does not copy the "Temp" folder in any way, and just copies the files in that folder. I am looking to get: C:\mp3\temp XX1.mp3 XX2.mp3 XX3..mp3 I personally am starting to think that this may possibly be a flaw/bug in the AI code. A DIRCOPY "should" copy the directory specified to the new location, and not the individual files in that directory. Case and point: A simple: xcopy c:\temp d:\music Will end up with the temp directory COMPLETELY being copied to d:\Music which would end up with: D:\Music\Temp(and all the files that were in the originating temp folder) It would NOT end up with d:\Music\ and all the individual files that were in the c:\temp folder, that is currently happening with this command in AI. A "True" DIRCOPY command SHOULD copy the directory and NOT just the files. This is for all intense purposes a DIRCOPY command and NOT a FILECOPY command. PLEASE correct me if I am wrong, but this just does not make sense to me in any way...........
  15. Thats pretty kewl with the dynamic directory. I have checked the code again, again & again, and just getting really frustrated at this point that something so simple is holding me back. I have spent like 3 hours JUST trying to copy a directory INTACT. Here is a very simple test: DirCopy("c:\Music\temp", "C:\MP3", 1) I have 3 MP3 files in the c:\Music\Temp" folder. When I execute the above line of code, it places the 3 mp3's INSIDE the temp folder, into c:\MP3, and is not maintain the directory structure. Someone give this a try them self and please let me know if it is just me. You can stick any ole text files images in the temp folder to test it out.
×
×
  • Create New...