-
Posts
19 -
Joined
-
Last visited
Profile Information
-
Location
Texas, USA
Recent Profile Visitors
ccbamatx's Achievements

Seeker (1/7)
0
Reputation
-
I have created a script that loops and watches for a window. When the window appears... it closes it. On Windows 7, the script works just fine. On Windows XP.. the script sometimes hangs/stalls/freezes. Below is the script So... the reason I know it hangs.. is that when it is looping, the "Checking Window State" scrolls with a new time every few seconds. Then.. on XP, when the window appears "Network ScanGear"," "All originals have been scanned" .... 1. The Checking Window State message freezes; and 2. The window does not go away. When I manually click the mouse to make the window go away... the script resumes. Any ideas on what I can check to determine what is hanging my system? WHILE 1 ToolTipFunc("Checking Window State... [" & @HOUR & ":" & @MIN & ":" & @SEC & "]") If WinExists("Network ScanGear", "Network processing is timed out") Then Send("{Enter}") ToolTipFunc("Scanner Not Found. Locate the Scanner") ToolTipFunc("Closing Process:" & $i_viewID) $Error=ProcessClose($i_viewID) ToolTipFunc("i_View Process (" & $i_viewID & " Closed:" & $Error & ". @Error=" & @Error) Sleep(50000) ElseIf WinExists("Network ScanGear", "All originals have been scanned") Then ToolTipFunc("Activating Window ... All Originals Scanned.") WinActivate ( "Network ScanGear", "All originals have been scanned") ToolTipFunc("Terminating Window.") Send("{TAB}{Enter}") ToolTipFunc("Scan Finished Window Terminated.") $ScanState = "2" Sleep(5000) ElseIf WinExists("Transfer Pages", "Transferring Page") Then ToolTipFunc("Scanning Pages....") Sleep(1000) ElseIf WinExists("Network ScanGear", "&Scan") Then ToolTipFunc("Executing Scan.") ToolTipFunc("Activating Window ... Network ScanGear.") $Error = WinActivate ( "Network ScanGear") Sleep(1000) ToolTipFunc("Starting Scan..." & $Error) If $ScanState = "2" Then ToolTipFunc("Closing ScanGear ... Network ScanGear. [" & $ScanState & "]") $ScanState = "0" ToolTipFunc("Closing ScanGear ... Network ScanGear. [" & $ScanState & "]") WinClose ( "Network ScanGear", "&Scan" ) Sleep(5000) Else Send("!s") $ScanState = "1" ToolTipFunc("Scan Started.") EndIf Else ToolTipFunc("No Window Match...") Sleep(1000) EndIf ToolTipFunc("Window State Check Complete...") Sleep(1000) WEND
-
Help with StringRegExpReplace
ccbamatx replied to ccbamatx's topic in AutoIt General Help and Support
Perfect!!! -
ccbamatx reacted to a post in a topic: Help with StringRegExpReplace
-
How to pipe variable to external program
ccbamatx replied to ccbamatx's topic in AutoIt General Help and Support
AutoIt is an integral part of the "Virtual Printer". So... the print spooler writes to a virutal port (RPT set up by Redmon ... I misspoke and called it PrintMon above) Redmon then picks up the stream and sends it to any external application in this case autoit... but it could be gs) along with whatever command line parameters. I use AutoIt to analyse the print stream and command line parameters.. and then name and process. gs then convert the print stream to TIFF and/or PDF... that is because it needs to be OCR'd, sorted, filed, etc. It is then instantly available, enterprise wide, as a resource to our EDMS solution, of course, properly tagged and indexed. -
How to pipe variable to external program
ccbamatx replied to ccbamatx's topic in AutoIt General Help and Support
I see you point.... but what I have built is a virtual printer.... So... someone, whereever they are on the network, and whether or not they are in Word, Excel, Acrobat, Outlook, etc... if they are wanting to archive the document they are looking at... they just print to the "Virtual Printer". So... at that point... a print job has been generated by who-knows-what or where... but the user wants to archive it. So now... in it comes to AutoIt... and I can run all kinds of analysis... that it would take years to train for and many more to audit for.... and then save it properly, in the proper format and proper folder... maybe even with a barcode stamp. It is working perfectly now... if I just write the variable to a file and then have gs pick up the file.... I was just wanting to skip that step and directly feed gs with the variable. -
ccbamatx changed their profile photo
-
How to pipe variable to external program
ccbamatx replied to ccbamatx's topic in AutoIt General Help and Support
JeremyNicoll... you are correct. AutoItScript is reading PostScript from a stream generated by PrintMon which is a printer port monitor. The reason that I need autoitscript in the middle is to generate a random name for the print job and also to use ghostscript to convert it to either pdf or TIFF depending on a number of factors. So... If I use the "some\path\to\a-program-that-generates-PS.exe" | "your-ghostscript-command..." ...which I can... I can't accomplish the above. -
I am having some trouble with StringRegExpReplace Can someone show me how to replace the following in a text string data data data data data data data data data CRLF data data data data data data data data data CRLF STARTING TEXT TAG data data data data data data data data data CRLF data data data data data data data data data CRLF 01010101010101010101010101010101010101 CRLF ENDING TEXT TAG data data data data data data data data data CRLF data data data data data data data data data CRLF I want to replace, starting with STARTING TEXT TAG... including the variable length data in between with CRLFs and ending with ENDING TEXT TAG with "" I can get STARTING {something} TAG with (?i)STARTING(.*?)TAG ...but I cant figure out how to get the other lines of data. Thanks a lot
-
I am receiving a postscript print job via ConsoleRead() and assigning that data to a variable: While True $sOutput &= ConsoleRead() If @error Then ExitLoop Sleep(25) WEnd At present... I am writing $sOutput to a file (tif.ps) and then having ghostscript (a postscript file processor) process the file with this string (it converts ps to color tiff): $iPID=RunWait(@ComSpec & " /c " & "C:\progra~2\gs\gs9.19\bin\gswin32c.exe -sDEVICE=tiff24nc -sOutputFile=c:\gstools\print.tif -dNOPAUSE -dSAFER -dBATCH c:\gstools\tif.ps","", @SW_MAXIMIZE ) I would like to skip writing the file and just pipe $sOutput directly to ghostscript. I know how to configure ghostscript to receive piped input. I do not know how to pipe a variable to an external program. Any ideas?
-
_IETagNameAllGetCollection / _IETagNameGetCollection
ccbamatx replied to Vakari's topic in AutoIt General Help and Support
souldjer777... Thank you so much for posting your code to this thread... in spite of the suggestion that it is an old topic, I have been looking for your specific example... and, as it happens, this post was the #1 return in my search engine SERP when I entered "autoit variable object". -
Can someone please point me toward the best example of using AutoIt with IPC (named pipes)? Thanks a lot.
-
Martin... that helps. Thanks very much.
-
Request a Web Page through a TCP client
ccbamatx replied to Andreik's topic in AutoIt General Help and Support
Thanks MrCreatoR for you help. I think the solution is to transmit in HTTP 1.0 -
Can someone tell me the significance of the TCPRecv parameter maxlen? I know that it is required and I know that it is the maximum # of characters to receive. But, if I have a string that is 10 bytes long and have maxlen set to 32, it will terminate anyway. If I have a string that is 15,000 bytes long and have maxlen set to 32, I just have to keep reading and appending. I can't see many circumstances, other than the old style fixed length variables, where I would know the exact length of the string that I am to receive. Is there a efficiency issue here? I guess I am asking, what is the optimum maxlen? And why? Thanks, CCB
-
Request a Web Page through a TCP client
ccbamatx replied to Andreik's topic in AutoIt General Help and Support
...after countless hours... I think it has something to do with "Transfer-Encoding: chunked" I noticed that ie and Firefox are receiving their responses as "Content-Encoding: gzip" Can you tell me how to check this and possibly fix it? Thanks, CCB Follow-up.. I was correct. It is Chunked Transfer-Encoding. The fix is to originate the request in HTTP 1.0. Otherwise, the server makes the choice. -
Request a Web Page through a TCP client
ccbamatx replied to Andreik's topic in AutoIt General Help and Support
Yes I am. Positive.... but I also do not think it is your script. I have looked at Wireshark and I am seeing it come in. I think it has something to do with my Cisco VPN... or something. Problem is that I can't make it happen and can't make it stop when it does happen. At my office, it happens on both my PCs. At my home, it sometimes happens and sometimes does not happen on my laptop. I really hate these obscure problems. Thanks for your reply. CCB -
Request a Web Page through a TCP client
ccbamatx replied to Andreik's topic in AutoIt General Help and Support
MrCreatoR...... when I use that piece of code, I sometimes get extra characters in the reply... which I do not think belong there... namely the "fef", "bbc" (in the middle of the reply string) and "0" character at the end. This appears to be very sporadic. The first time I ran your code, it worked perfectly. Subsequent times, it starting returning these characters....then I ran it again and it worked perfectly.... I was monkeying with the maxlen parameter. I have worked on this for about a week switching from ascii to binary and back. Any ideas? GOOGLE RESPONSE vi MrCreatoR's _HTTPGet: ----------------------------------------------------------------------------------------------------------------------------- HTTP/1.1 200 OK Date: Sun, 07 Mar 2010 20:51:54 GMT Expires: -1 Cache-Control: private, max-age=0 Content-Type: text/html; charset=UTF-8 Set-Cookie: PREF=ID=ad7335fca99c3610:TM=1267995113:LM=1267995114:S=F3Reb2laG0sOrmNC; expires=Tue, 06-Mar-2012 20:51:54 GMT; path=/; domain=.google.com Set-Cookie: NID=32=FdYb2qFmaAyGiNmmmX-KOcdPFM32kYASypwyHfFiEFTq2yhGHuQKW2Tr0GxEZWKqCKcTnfQXN9KK1mPYfh8UmCHFPu4fy8eqWfl5WVKx8OXe8ejveZfMYR-zkanjIjyQ; expires=Mon, 06-Sep-2010 20:51:54 GMT; path=/; domain=.google.com; HttpOnly Server: gws X-XSS-Protection: 0 Transfer-Encoding: chunked Connection: close fef <!doctype html><html onmousemove="google&&google.fade&&google.fade(event)"><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title><script>window.google={kEI:"6RGUS6LYPKGEeKP01YUN",kEXPI:"23729,24025",kCSI:{e:"23729,24025",ei:"6RGUS6LYPKGEeKP01YUN",expi:"23729,24025"},ml:function(){},pageState:"#",kHL:"en",time:function(){return(new Date).getTime()},log:function(b,d,c){var a=new Image,e=google,g=e.lc,f=e.li;a.onerror=(a.onload=(a.onabort=function(){delete g[f]}));g[f]=a;c=c||"/gen_204?atyp=i&ct="+b+"&cad="+d+"&zx="+google.time();a.src=c;e.li=f+1},lc:[],li:0,j:{en:1,l:function(){},e:function(){},b:location.hash&&location.hash!="#",pl:[],mc:0,sc:0.5},Toolbelt:{}};(function(){for(var d=0,c;c=["ad","bc","p","pa","zd","ac","pc","pah","ph","sa","xx","zc","zz"][d++](function(a){google.j[a]=function(){google.j.pl.push([a,arguments])}})©})(); window.google.sn="webhp";window.google.timers={load:{t:{start:(new Date).getTime()}}};try{window.google.pt=window.gtbExternal&&window.gtbExternal.pageT();}catch(u){}window.google.jsrt_kill=1; </script><style>td{line-height:.8em;}.gac_m td{line-height:17px;}form{margin-bottom:20px;}body,td,a,p,.h{font-family:arial,sans-serif}.h{color:#36c;font-size:20px}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{font:17px arial,sans-serif;margin-bottom:.2em;vertical-align:bottom;}input{font-family:inherit}.lsb,.gac_sb{font-size:15px;height:1.85em!important;margin:.2em;}#fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{opacity:0;}#fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{background:#fff;}#gbar{float:left;height:22px}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}#gbs,.gbm{background:#fff;left:0;position:absolute;text-align:left;visibility:hidden;z-index:1000}.gbm{border:1px solid;border-color:#c9d7f1 #36c #36c #a2bae7;z-index:1001}#guser{padding-bottom:7px !important;text-align:right}#gbar,#guser{font-size:13px;padding-top:1px !important}.gb1{margin-right:.5em}.gb1,.gb3{zoom:1}.gb2{display:block;padding:.2em .5em}.gb2,.gb3{text-decoration:none}a.gb1,a.gb2,a.gb3,a.gb4{color:#00c !important}a.gb2:hover{background:#36c;color:#fff !important}</style><noscript><style>#fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{opacity:1;}</style></noscript><script>var _gjwl=location;function _gjuc(){var b=_gjwl.href.indexOf("#");if(b>=0){var a=_gjwl.href.substring(b+1);if(/(^|&)q=/.test(a)&&a.indexOf("#")==-1&&!/(^|&)cad=h($|&)/.test(a)){_gjwl.replace("/search?"+a.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h");return 1}}return 0}function _gjp(){!(window._gjwl.hash&&window._gjuc())&&setTimeout(_gjp,500)}; google.y={};google.x=function(e,g){google.y[e.id]=[e,g];return false};if(!window.google)window.google={};window.google.crm={};window.google.cri=0;window.clk=function(d,e,f,j,k,l,m){if(document.images){var a=encodeURIComponent||escape,b=new Image,g=window.google.cri++;window.google.crm[g]=b;b.onerror=(b.onload=(b.onabort=function(){delete window.google.crm[g]}));b.src=["/url?sa=T","",e?"&oi="+a(e):"",f?"&cad="+a(f):"","&ct=",a(j||"res"),"&cd=",a(k),"&ved=",a(m),d?"&url="+a(d.replace(/#.*/,"")).replace(/\+/g,"%2B"):"","&ei=","6RGUS6LYPKGEeKP01YUN",l].join("")} return true}; window.gbar={qs:function(){},tg:function(e){var o={id:'gbar'};for(i in e)o=e;google.x(o,function(){gbar.tg(o)})}};</script></head><body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b alink=#ff0000 onload="try{!google.j.b&&document.f.q.focus()}catch(e){};if(document.images)new Image().src='/images/nav_logo7.png'" topmargin=3 marginheight=3><textarea id=csi style=display:none></textarea><script>if(google.j.document.body.style.visibility='hidden';</script><iframe name=wgjf style=display:none src="" onload="google.j.l()" onerror="google.j.e()"></iframe><textarea id=wgjc style=display:none></textarea><textarea id=csi style=display:none></textarea><textarea id=hcache style=display:none></textarea><span id=main><div id=ghead><div id=gbar><nobr><b class=gb1>Web</b> <a href="http://images.google.c fef om/imghp?hl=en&tab=wi" onclick=gbar.qs(this) class=gb1>Images</a> <a href="http://video.google.com/?hl=en&tab=wv" onclick=gbar.qs(this) class=gb1>Videos</a> <a href="http://maps.google.com/maps?hl=en&tab=wl" onclick=gbar.qs(this) class=gb1>Maps</a> <a href="http://news.google.com/nwshp?hl=en&tab=wn" onclick=gbar.qs(this) class=gb1>News</a> <a href="http://www.google.com/prdhp?hl=en&tab=wf" onclick=gbar.qs(this) class=gb1>Shopping</a> <a href="http://mail.google.com/mail/?hl=en&tab=wm" class=gb1>Gmail</a> <a href="http://www.google.com/intl/en/options/" onclick="this.blur();gbar.tg(event);return !1" aria-haspopup=true class=gb3><u>more</u> <small>▼</small></a><div class=gbm id=gbi><a href="http://books.google.com/bkshp?hl=en&tab=wp" onclick=gbar.qs(this) class=gb2>Books</a> <a href="http://www.google.com/finance?hl=en&tab=we" onclick=gbar.qs(this) class=gb2>Finance</a> <a href="http://translate.google.com/?hl=en&tab=wT" onclick=gbar.qs(this) class=gb2>Translate</a> <a href="http://scholar.google.com/schhp?hl=en&tab=ws" onclick=gbar.qs(this) class=gb2>Scholar</a> <a href="http://blogsearch.google.com/?hl=en&tab=wb" onclick=gbar.qs(this) class=gb2>Blogs</a> <div class=gb2><div class=gbd></div></div><a href="http://www.youtube.com/?hl=en&tab=w1" onclick=gbar.qs(this) class=gb2>YouTube</a> <a href="http://www.google.com/calendar/render?hl=en&tab=wc" class=gb2>Calendar</a> <a href="http://picasaweb.google.com/home?hl=en&tab=wq" onclick=gbar.qs(this) class=gb2>Photos</a> <a href="http://docs.google.com/?hl=en&tab=wo" class=gb2>Documents</a> <a href="http://www.google.com/reader/view/?hl=en&tab=wy" class=gb2>Reader</a> <a href="http://sites.google.com/?hl=en&tab=w3" class=gb2>Sites</a> <a href="http://groups.google.com/grphp?hl=en&tab=wg" onclick=gbar.qs(this) class=gb2>Groups</a> <div class=gb2><div class=gbd></div></div><a href="http://www.google.com/intl/en/options/" class=gb2>even more »</a> </div></nobr></div><div id=guser width=100%><nobr><a href="/url?sa=p&pref=ig&pval=3&q=http://www.google.com/ig%3Fhl%3Den%26source%3Diglk&usg=AFQjCNFA18XPfgb7dKnXfKz7x7g1GDH1tg" class=gb4>iGoogle</a> | <a href="/preferences?hl=en" class=gb4>Search settings</a> | <a href="https://www.google.com/accounts/Login?hl=en&continue=http://www.google.com/" class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div></div> <center><span id=body><center><br clear=all id=lgpd><img alt="Google" height=110 src="/intl/en_ALL/images/logo.gif" width=276 id=logo onload="window.lol&&lol()"><br><br><form action="/search" name=f onsubmit="google.fade=null"><table cellpadding=0 cellspacing=0><tr valign=top><td width=25%> </td><td align=center nowrap><input name=hl type=hidden value=en><input name=source type=hidden value=hp><input autocomplete="off" onblur="google&&google.fade&&google.fade()" maxlength=2048 name=q size=55 class=lst title="Google Search" value=""><br><input name=btnG type=submit value="Google Search" class=lsb onclick="this.checked=1"><input name=btnI type=submit value="I'm Feeling Lucky" class=lsb onclick="this.checked=1"></td><td nowrap width=25% align=left id=sbl><font size=-2> <a href="/advanced_search?hl=en">Advanced Search</a><br> <a href="/language_tools?hl=en">Language Tools</a></font></td></tr></table></form><br></center></span> <span id=footer><center id=fctr><br><font size=-1><a href="/intl/en/ads/">Advertising Programs</a> - <a href="/services/">Business Solutions</a> - <a href="/intl/en/about.html">About Google</a></font><p><font size=-2>©2010 - <a href="/intl/en/privacy.html">Privacy</a></font></p></center></span> </span> <script>function _gjp() {!(location.hash && _gjuc()) && setTimeout(_gjp, 500);}google.j[1]={cc:[],co:['ghead','body','footer','xjsi'],pc:[],nb:0,css:document.getElementsByTagName('style')[0].innerHTML,main:'<div id=ghead></div><span id=body></span><span id=footer></span><span id=xjsi></span>'};</script><script>function wgjp(){var xjs=document.createElement('script');xjs.src='/extern_chrome/744a3c8a556db bbc 445.js';(document.getElementById('xjsd') || document.body).appendChild(xjs)};</script><div id=xjsd></div><div id=xjsi><script>if(google.y)google.y.first=[];if(google.y)google.y.first=[];if(!google.xjs){google.dstr=[];google.rein=[];window.setTimeout(function(){var a=document.createElement("script");a.src="/extern_js/f/CgJlbhICdXMrMAo4XUAILCswDjgMLCswFjgXLCswFzgGLCswGDgFLCswGTgXLCswHTgkLCswJTjKiAEsKzAmOAksKzAnOAQsKzAqOAMsKzArOAosKzA8OAIsKzBAOAssKzBEOAIsKzBFOAEs/Je5yR72NtSU.js";(document.getElementById("xjsd")||document.body).appendChild(a);if(google.timers&&google.timers.load.t)google.timers.load.t.xjsls=(new Date).getTime();},0); google.xjs=1};google.neegg=1;google.y.first.push(function(){(function(){ function b(a){document.cookie=a}function c(){if(!document.cookie.match(/GZ=Z=[0,1]/)){b("GZ=Z=0");var a=document.createElement("iframe");a.src="/compressiontest/gzip.html";a.style.display="none";(document.getElementById("xjsd")||document.body).appendChild(a)}}c(); })() ;google.ac.m=1;google.ac.b=true;google.ac.i(document.f,document.f.q,'','','',{o:1});(function(){ var g,h,i=1,k=google.time();google.rein.push(function(){i=1;k=google.time()});google.dstr.push(function(){google.fade=null});function l(c,e){var a=[];for(var b=0,d;d=c[b++]{var f=document.getElementById(d);f&&a.push(f)}for(var b=0,j;j=e[b++];)a=a.concat(m(j[0],j[1]));for(var b=0;a;b++)a=[a,"opacity",0,1,0,""];return a}function m(c,e){var a=[],b=0,d,f=document.getElementsByTagName©;for(;d=f[b++];)d.className== e&&a.push(d);return a}google.fade=function©{if(google.fx&&i){c=c||window.event;var e=1,a=google.time()-k;if(c&&c.type=="mousemove"){var b=c.clientX,d=c.clientY;e=(g||h)&&(g!=b||h!=d)&&a>600;g=b;h=d}if(e){i=0;google.fx.animate(600,l(["fctr","ghead","pmocntr","sbl","tba","tbe"],[["span","fade"],["div","fade"],["div","gbh"]]))}}}; })(); ;google.History&&google.History.initialize('/')});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);google.fade=null;}</script></div><script>(function(){ var b,d,e,f;function g(a,c){if(a.removeEventListener){a.removeEventListener("load",c,false);a.removeEventListener("error",c,false)}else{a.detachEvent("onload",c);a.detachEvent("onerror",c)}}function h(a){f=(new Date).getTime();++d;a=a||window.event;var c=a.target||a.srcElement;g(c,h)}var i=document.getElementsByTagName("img");b=i.length;d=0;for(var j=0,k;j<b;++j){k=i[j];g(k,h);if(k.complete||typeof k.src!="string"||!k.src)++d;else if(k.addEventListener){k.addEventListener("load",h,false);k.addEventListener("error", h,false)}else{k.attachEvent("onload",h);k.attachEvent("onerror",h)}}e=b-d;function l(){google.timers.load.t.ol=(new Date).getTime();google.timers.load.t.iml=f;google.kCSI.imc=d;google.kCSI.imn=b;google.kCSI.imp=e;google.report&&google.report(google.timers.load,google.kCSI)}if(window.addEventListener)window.addEventListener("load",l,false);else if(window.attachEvent)window.attachEvent("onload",l);google.timers.load.t.prt=(f=(new Date).getTime()); })(); </script> 0