
itctravel
Members-
Posts
16 -
Joined
-
Last visited
itctravel's Achievements

Seeker (1/7)
0
Reputation
-
So, I had a copy of this from a couple months back and have been playing with it. I have discovered something very interesting. If the .dll is not located in the autoitInclude folder, the function doesn't work even after the script is compiled. I have tried it with the .dll in the windowssystem32 but no go. If I have the folder C:\Program Files\AutoIt3\Include\ present and have the .dll located there, it works! Is this an issue with the ImageSearch.au3? Since I plan on using this on computers that do not have AutoIt installed I am hoping to see if I can find the solution to the problem. I know that the compiller has a tab 'Res Add Files' and then a box for 'Extra Files'...I am not sure if I try putting the .dll there if that will help or not as I have not messed with that functionality to date and not quite sure what it is used for specifically. I will include some of my code just for refference in case I am not calling the function properly etc. I won't include all the code, just up until it trys to use _ImageSearch. Thanks in advance for any help with this!....UPDATE!! So I opened up the ImageSearch.au3 and I see the problem $result = DllCall("C:\Program Files\AutoIt3\Include\ImageSearchDLL.dll","str","ImageSearch","int",$x1,"int",$y1,"int",$right,"int",$bottom,"str",$findImage) This is telling the program to look specifically at that location for the .dll!!! What is the best way to change that to specify the system folder for various OS? I know something with wildcard % etc? Hopefully this helps others too!
-
I have tried to download the ZIP from posts #63 and 64, which I believe should be the most current. I get an error saying the ZIP is invalid or corrupted...any ideas?
-
I have tried to use this but get the following error: >"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:SynergyExtraReadsExtraReads2.au3" /UserParams +>12:04:32 Starting AutoIt3Wrapper v.2.1.2.9 Environment(Language:0409 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X86) >Running AU3Check (1.54.22.0) from:C:Program FilesAutoIt3 C:\Program Files\AutoIt3\Include\ImageClip.au3(65,70) : WARNING: $LR_COPYDELETEORG: possibly used before declaration. Local $hBitmap = _WinAPI_CopyImage($hBitmap2,0,0,0,$LR_COPYDELETEORG+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\Include\ImageClip.au3(65,88) : WARNING: $LR_COPYRETURNORG: possibly used before declaration. Local $hBitmap = _WinAPI_CopyImage($hBitmap2,0,0,0,$LR_COPYDELETEORG+$LR_COPYRETURNORG) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\Include\ImageClip.au3(65,70) : ERROR: $LR_COPYDELETEORG: undeclared global variable. Local $hBitmap = _WinAPI_CopyImage($hBitmap2,0,0,0,$LR_COPYDELETEORG+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\Include\ImageClip.au3(65,88) : ERROR: $LR_COPYRETURNORG: undeclared global variable. Local $hBitmap = _WinAPI_CopyImage($hBitmap2,0,0,0,$LR_COPYDELETEORG+$LR_COPYRETURNORG) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\Include\ImageClip.au3(85,63) : ERROR: _WinAPI_Check(): undefined function. _WinAPI_Check("_WinAPI_CopyImage", ($aResult[0] = 0), 0, True) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:SynergyExtraReadsExtraReads2.au3 - 3 error(s), 2 warning(s) !>12:04:33 AU3Check ended. Press F4 to jump to next error.rc:2 >Exit code: 2 Time: 2.009 I have imageclip.au3 in my include folder. I also added winapiex.au3 to the include. imageclip.au3 doesn't have it or winapi.au3 on the includes at the top of the script but it seems that is where these errors have their root. I am not sure if I should try modifying imageclip.au3 to put these in the includes or not?
-
So I am trying to break this down to basics and I've done a simple experiment that shows the problem. I Created a .txt (test.txt) document that contains only the following line "this, is, a, line, of, text" I then perform this script #include <Array.au3> Local $TranText = FileRead("c:\test.txt") Local $TranArray = StringSplit($TranText, ',') Local $text = StringReplace($TranArray[1], "i", "-") Local $numreplacements = @extended MsgBox(0, "The number of replacements done was", $numreplacements) _ArrayDisplay($TranArray) The $numreplacements indicates a change was made but when you do the _ArrayDisplay, it doesn't reflect the change For what it is worth, I am at version Version 3.2.0 for SciTE
-
Admiral; Thanks for your reply. I changed so much playing around that I accidently initially posted the wrong iteration of the program. Thanks for the tip about the autoit tags...I modified appropriately. So to clarify what I am trying to do is I have 'divided' this long .txt into an array which is created with each 'new page' of the report Local $TranArray = StringSplit($TranText, ' ', 1) for some reason the special character I am splitting with doesn't translate over to this post but it is here and I verified that part is working. Then I run through each array to see if the words "RUN DATE" exists without the words "Unsigned transcriptions" on the page. If it does, I want to replace the words "RUN DATE" with "xxxxxxx" Sorry for prematurely posting the wrong code but what you see now is the best I have come to so far and seems to work except for the saving to file part. It does save the file but the file doesn't show the "xxxxxxx" changes I made in the loop. I am wondering if there are special ASCII characters in my .txt file that could be preventing this from working? I know it is a long shot but I have racked my brain as to why the canges never 'take' BTW, I like your boat
-
I know this looks similar to some other posts. I looked at a few and 1 of them I thought for sure was the answer but it didn't work so in desperation I am starting this thread. So, I have a large text file that I am looking to replace the words "RUN DATE" when certain criteria isn't met. I through some MsgBox feedback etc in here so I could better understand what is happening. It seems the logic is working. It finds the instances where the criteria is met and makes (appears to) changes to the array which is evident when it performs the "MsgBox(0, "String Replace State", $StringReplace)" function i.e. I see the change to that array in the result. The problem is that when I do a _FileWriteFromArray and then look at the new file that is created it doesn't reflect the changes made. I know I am very close but just can't seem to figure this one out. I did try changing the $i_Base to 0 specifically as was mentioned on another thread (Thought for sure that would work) but still the same problem. Here is my ugly code...please don't laugh #include <Array.au3> #include <File.au3> $FileOpen = FileOpen ( "c:\trantest.txt") Local $TranText = FileRead("c:\trantest.txt") Local $TranArray = StringSplit($TranText, ' ', 1);This splits the .txt file into an array. Each array is the beginning of a new page which is what the 'FF' represents. MsgBox(0, "Number of Strings in Array", $TranArray[0]) For $i = $TranArray[0] To 1 Step -1;This checks how many arrays the page has been split into so that we can loop through each array to test for the condition we are looking for. $UnsignedTrans = 99999 ;We need to set an initial value here. If there is a page with RUN DATE that doesn't have the text 'Unsigned transcriptions" this value will be set to zero $Search = StringInStr ( $TranArray[$i], "RUN DATE") MsgBox(0, "Array Test", $Search) If $Search <> 0 Then MsgBox(0, "String Found", "String Found in Array" & $i) Global $UnsignedTransTest = StringInStr($TranArray[$i], "Unsigned transcriptions") MsgBox(0, "Unsigned text exists?", $UnsignedTransTest) $UnsignedTrans = $UnsignedTransTest MsgBox(0, "2", $UnsignedTrans) EndIf If $UnsignedTrans = 0 Then MsgBox(0, "Error at line", $i) Local $StringReplace = StringReplace($TranArray[$i], "RUN DATE", "xxxxxxx", 1) _ArrayDisplay($TranArray) $UnsignedTrans = 99999; this resets the variable so the next loop itteration can run correctly ;FileClose($FileOpen) $FileWrite = _FileWriteFromArray("C:\test.txt", $TranArray) MsgBox(0, "File Write State", $FileWrite) MsgBox(0, "File Write Error", @error) MsgBox(0, "String Replace State", $StringReplace) EndIf Next MsgBox(0, "", "Blast Off!")
-
Passing Data upon call to launch .exe
itctravel replied to itctravel's topic in AutoIt General Help and Support
Hey Guys, with your help, I now completed my script and am very happy with the results. Thanks to all for your guidence! -
making 2 variables from comma seperated data
itctravel replied to itctravel's topic in AutoIt General Help and Support
Hey Guys, with your help, I now completed my script and am very happy with the results. Thanks to all for your guidence! -
making 2 variables from comma seperated data
itctravel replied to itctravel's topic in AutoIt General Help and Support
Thanks Water, I will check out your example. I did end up finding 'StringSplit' before posting but couldn't figure how to make it do what I wanted to. I am sure the example you mention should help me piece it together. JLogan3o13 I am not trying to get anyone upset, I thought this question to be independent of my previous post. -
Passing Data upon call to launch .exe
itctravel replied to itctravel's topic in AutoIt General Help and Support
Ok guys (gals?), I have run ito a small issue that I am sure someone will be able to come up with a solution for. I have tried the help file for about an hour now trying to figure a way to accomplish this but figured instead of wasting a day to ask the group. The command above is working for me and now I can see how the extra parameters are being passed from the outside application. The problem is that instead of a space between data1 and data2 there is a comma seperating them. My job would be easy if I could get the outside app to pass the qualifiers with a space but they are not able. I want to end up with 2 variables. Variable1 = data1, variable2 = data2 Any ideas? Thanks again! -
Passing Data upon call to launch .exe
itctravel replied to itctravel's topic in AutoIt General Help and Support
It Works!!! Thanks again to you and all on this forum that help turn coal to diamonds! -
Passing Data upon call to launch .exe
itctravel replied to itctravel's topic in AutoIt General Help and Support
Thanks Unicornasaurus! I will try playing with that a bit. I am looking at this in the HELP file for more detail. I appreciate you taking the time to help, I think I should be able to make this work.