Jump to content

Gumma

Members
  • Posts

    18
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Gumma's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I've been ruminating on the solution to this problem... but I can't figure out how to do this. Here's the deal: A random user logs into a VMWare pool. The pool spawns a computer with a random name. I want the user to be able to be able to run the script on the computer in VMWare, and then send data and/or a command back to their "local" computer (they're running VMWare from full computers not thin clients). I've completed both the virtual and "local" script for this project, I just haven't seemed to connect the dots. How do I get the program that is executed on the VMWare computer to know where to send the data? Users may be logging in from different computers, so the computer names/IP addresses may or may not be constant for the local machine or the virtual computer. I should also note that it's possible that there may be multiple users on multiple computers attempting to do this simultaneously. Any advice would be greatly appreciated!
  2. Thanks guys - I knew I was missing something easy
  3. I am probably going to embarrass myself here, but... why isn't this working: FileWriteLine($file,"fTravelPlans" & "{TAB}" & "fCellPhone" & "{TAB}" &"fClinicFax" & "{TAB}" & "fClinicPhoneNumber" & "{TAB}" & "fCurrentMedicalHistory" & "{TAB}") My output looks like this: fTravelPlans+{TAB}fCellPhone{TAB}fClinicFax{TAB}fClinicPhoneNumber{TAB}fCurrentMedicalHistory{TAB} instead of adding a tab as I need. I am guessing I'm missing something really easy here... so maybe someone can help me! Thanks
  4. I'd delete my post but I don't know how. Figured it out. I was just a little off. For $i = 0 To UBound($str) - 1 $s_string = StringRegExpReplace($s_string, "\,[A-z]", ", " & $str[$i], 1) MsgBox("", $i, $s_string) Next
  5. I'm playing around with this -- I am trying to correct grammer errors automatically in paragraphs. So for instance "Hi,how are you." Or "Hi, how are you.." Those are just a few examples. I might be going about this wrong, so I thought I'd post what I'm working on and see if I can get some advise. The last part of the code fixes the grammer, but it does it everywhere. Is there a smarter way I can do this so that it actually replaces the errors correctly without breaking up each paragraph into an array or something? Local $s_string, $test, $str, $strang Local $i $s_string = "This is test,okay? Do you like me in that way,yes? Or not really??? That is,sad. Time to test,further." $str = StringRegExp($s_string,"\,\D",3) _ArrayDisplay($str) For $i = 0 to UBound($str)-1 $str[$i] = StringReplace($str[$i], ",","") Next _ArrayDisplay($str) For $i = 0 to UBound($str)-1 $strang = StringRegExpReplace ($s_string, "\,[A-z]", ", " & $str[$i], $i) MsgBox("",$i,$strang) Next
  6. Wow I am a knuckle head. Thanks so much - I can't believe I've been banging my head against that for a half hour now. I don't know why I was thinking that the double quotes were needed. Thanks so much!!!
  7. $QSID = 90620;this would normally be dynamic $sql = _MySQLConnect("DataMiner", "", "DataMiner", "10.40.32.45") ;$var = _Query($sql, "SELECT * FROM patients WHERE patient_id = '0906200'") $var = _Query($sql, """SELECT * FROM patients WHERE patient_id = '0" & $QSID & "0'""") I have been having a problem with the _Query command. I need to make the query dynamic based on a patient identifier, $QSID. The code works if I uncomment line 2 and comment line 3 (thus making it a static query), however, I believe they say the same thing. is my formatting wrong? If I turn $sql = _MySQLConnect("DataMiner", "", "DataMiner", "10.40.32.45") ;$var = _Query($sql, "SELECT * FROM patients WHERE patient_id = '0906200'") $var = _Query($sql, """SELECT * FROM patients WHERE patient_id = '0" & $QSID & "0'""") I did a test and made $query = """SELECT * FROM patients WHERE patient_id = '0" & $QSID & "0'""" msgbox(0,"",$query) and it appears to yield the same input data as line two. Any help would be greatly appreciated. error consult: mysql.au3 (48) : ==> The requested action with this object has failed.: Return $oConnectionobj.execute ($sQuery) Return $oConnectionobj.execute ($sQuery)^ ERROR ->13:52:34 AutoIT3.exe ended.rc:1
  8. I'm not sure exactly what this is called, and because of that I haven't been able to get good results when googling. Basically, we have dental software that links up with our x-ray software, and in the process of them talking together, they pass or "bridge" information such as name, dob, pt id, etc. These do this by adding %commands% to the run line. It looks like this: C:\XrayVisionDCV\XrayVisionDCV.exe -h -p %namelast%,%namefirst%::::%idqsi% When you run that command line FROM the dental software, it will convert those tags into current patient data. However, if I run it from the run command or an auto-it script, the name field will display as %namelast%. So my question is: 1) What do you call those %value%'s. 2) Is there anyway I can use autoit to make it look like the dental software is executing that command to push the data into the radiograph software? Alternatively, it would almost be better if I could just covert %namelast% and store it into $var, but I just don't understand how that process works. Any advice would be greatly appreciated. Thanks
  9. I forgot to mention - this script worked fine on windows xp. I didn't specific which OS it worked under.
  10. I had made this script a while ago to log in to a local intranet webpage automatically. It saved me a little time. Anyway, I've switched to a win7 box and the script no longer works. I've denoted in the comments where the script appears to die/hang. I can't figure out what has changed. Any help would be greatly appreciated!!! #i don't get it?
  11. A few little tidbits about my system: I'm working with WinXP and Outlook 2007. I am just playing with the following script but I can't figure out exactly what I'm doing wrong. I've used other UDFs for word, excel, etc but I can't seem to get this to work. Here's the script: #Include <Date.au3> #Include <Array.au3> #Include "C:\Documents and Settings\username\Desktop\Outlook\Outlook.au3" Local $oOutlook, $test, $test2 $test2 = _OutlookOpen() _OutlookOpen() sleep(100) $test= _OutlookSendMail($oOutlook, "email@email.org", "", "", "test", "this is the body") _OutlookSendMail($oOutlook, "email@email.org", "", "", "test", "this is the body") msgbox(0,0,$test & $test2) I just created those two variables to see if I was getting any results or anything, but it doesn't even get me that far. When I read the syntax, it seems like I should be doing it correctly but I get this error: >Running:(3.3.0.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\SendMail Test.au3" C:\Documents and Settings\dlenaker\Desktop\Outlook\Outlook.au3 (420) : ==> Error in expression.: Local $oMessage = $oOutlook.CreateItem($olMailItem) Local $oMessage = ^ ERROR ->13:16:27 AutoIT3.exe ended.rc:1 +>13:16:28 AutoIt3Wrapper Finished >Exit code: 1 Time: 1.853 Can anyone help show me what I'm doing wrong? Thanks in advance.
  12. I have had the exact same problem with the SHIFT function randomly activating. The only thing I have done to fix this is to set the Opt("SendKeyDelay") to something very high, liek Opt("SendKeyDelay", 50). The downside to this work around is that you're program will now type substantially slower... It'd be nice if the function just worked. Since it's so repeatable, I'm guessing a Dev or someone has commented on this? I've searched for ControlSend and I can't seem to find anything.
  13. Wow thanks a bunch - I can't beleive I missed that SetData command. Really appreciate the time you guys took. Problem solved
  14. #include <GUIConstantsEx.au3> #include <GUIComboBox.au3> Local $ES_MULTILINE ; Curent GenericCombo text $sCurrGenericData = "" ; Create GUI $Form1_1 = GUICreate("YKHC Data Handler", 937, 520, 175, 124) $MedPut = GUICtrlCreateCombo("", 488, 104, 265, 25) GUICtrlSetData(-1, "Rx: Hydrocodone/Acetaminophen 5/500mg|Rx: Penicillin VK 500mg|Rx: Clindamycin 150mg|Rx: Acetaminophen 325mg|Rx: Ibuprofen 400mg|Rx: Tylenol No. 3|Rx: Chlorhexidine Oral Rinse 0.12%|Rx: Prevident Rinse (0.2% Neutral NaF)|Rx: Prevident 5000 Plus toothpaste (1.1% NaF)|Rx: Amoxicillin 500mg|Rx: Acetaminophen chewable tablets 80mg|Rx: Clindamycin oral solution 75mg/5ml|Rx: Amoxicillin Suspension 250mg/5ml") _GUICtrlComboBox_SetEditText($MedPut, "Rx: Penicillin VK 500mg") ; If I put Rx: Hydrocodone/Acetaminophen 5/500mg it updates, if I put Rx: Penicillin VK 500mg it won't start w/ default disp values $Label14 = GUICtrlCreateLabel("Meds:", 432, 104, 33, 17) $DispPut = GUICtrlCreateCombo("", 488, 136, 250, 21) GUICtrlSetData(-1, "Disp: Two (2) tabs|Disp: Four (4) tabs|Disp: Eight (8) tabs|Disp: Twelve (12) tabs|Disp: Sixteen (16) tabs|Disp: Fourty (40) tabs") $Label15 = GUICtrlCreateLabel("Disp:", 432, 136, 28, 17) $SigPut = GUICtrlCreateEdit("", 488, 168, 265, 63, $ES_MULTILINE) $Label16 = GUICtrlCreateLabel("Sig:", 432, 168, 19, 17) $PreviewPut = GUICtrlCreateEdit("Input1", 488, 264, 265, 84, $ES_MULTILINE) $PreviewButton = GUICtrlCreateButton("Preview", 488, 360, 80, 34) $Label17 = GUICtrlCreateLabel("", 432, 264, 45, 17) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $PreviewButton $Med = GUICtrlRead ($MedPut, 1) $Disp = GUICtrlRead ($DispPut, 1) $Sig = GUICtrlRead ($SigPut, 1) GUICtrlSetData($PreviewPut, $Med & @CRLF & $Disp & @CRLF & $Sig) $PreviewPut = GUICtrlRead ($PreviewPut, 1) ClipPut($PreviewPut) EndSwitch ; Read GenericCombo selection $sGenericData = GUICtrlRead($MedPut, 1) ; If it has changed AND the combo is closed - if we do not check for closure, the code actions while we scan the dropdown list If $sGenericData <> $sCurrGenericData AND _GUICtrlComboBox_GetDroppedState($MedPut) Then ; Reset the current text so prevent flicker from constant redrawing $sCurrGenericData = $sGenericData ; Hide/Show the combos depending on the selection Switch $sGenericData Case "Rx: Hydrocodone/Acetaminophen 5/500mg" GUICtrlSetData($DispPut, "Disp: Twelve (12) tabs") GUICtrlSetData($SigPut, "Sig: 1 tablet every 6 hours as needed for pain.") Case "Rx: Penicillin VK 500mg" GUICtrlSetData($DispPut, "Disp: Twenty-eight (28) tabs") GUICtrlSetData($SigPut, "Sig: 1 tablet PO every 6 hours (QID), until gone.") Case "Rx: Clindamycin 150mg" GUICtrlSetData($DispPut, "Disp: Fifty-six (56)") GUICtrlSetData($SigPut, "Sig: 2 tablets PO (QID) until gone.") Case "Rx: Acetaminophen 325mg" GUICtrlSetData($DispPut, "Disp: Twenty-four (24) tabs") GUICtrlSetData($SigPut, "Sig: 2-3 tablets every 6 hours as needed for pain.") Case "Rx: Ibuprofen 400mg" GUICtrlSetData($DispPut, "Disp: Forty (40) tabs") GUICtrlSetData($SigPut, "Sig: 1 or 2 tablets q6h prn pain.") Case "Rx: Tylenol No. 3" GUICtrlSetData($DispPut, "Disp: Four (4) tabs") GUICtrlSetData($SigPut, "Sig: 1 or 2 tablets q6h prn pain.") Case "Rx: Chlorhexidine Oral Rinse 0.12%" GUICtrlSetData($DispPut, "Disp: 1 bottle (473ml)") GUICtrlSetData($SigPut, "Sig: 1/2 oz swish for 30 sec bid for 7-14 days") Case "Rx: Prevident Rinse (0.2% Neutral NaF)" GUICtrlSetData($DispPut, "Disp: 1 bottle (473ml)") GUICtrlSetData($SigPut, "Sig: 1/2 oz swish three times a week.") Case "Rx: Prevident 5000 Plus toothpaste (1.1% NaF)" GUICtrlSetData($DispPut, "Disp: 1 tube (1.8 oz)") GUICtrlSetData($SigPut, "Sig: brush on teeth for two minutes once per day") Case "Rx: Amoxicillin 500mg" GUICtrlSetData($DispPut, "Disp: Four (4) tabs") GUICtrlSetData($SigPut, "Sig: 4 tablets 1 hour before tx.") Case "Rx: Acetaminophen chewable tablets 80mg" GUICtrlSetData($DispPut, "Disp: One bottle (30 tabs)") GUICtrlSetData($SigPut, "Sig: take as directed on the package (do not exceed 10mg/kg per dose) every 4-6 hours as needed for pain.") Case "Rx: Clindamycin oral solution 75mg/5ml" GUICtrlSetData($DispPut, "Disp:30mg/kg/day") GUICtrlSetData($SigPut, "Sig: taken as 4 equal doses per day for 7 days.") Case "Rx: Amoxicillin Suspension 250mg/5ml" GUICtrlSetData($DispPut, "Disp: One bottle (150ml)") GUICtrlSetData($SigPut, "Sig: 40mg/kg/day taken as 3 equal doses per day for 10 days.") EndSwitch EndIf WEnd I have a combo box here that when I switch the value of the med, it should update the disp and sig as well. It does this, but not without error. If I run the script and select the medication via mouse click to "Rx: Hydrocodone..." the values update appropriately. However, if I immediately select "Rx: Penicillin..." the Disp value remains teh same, but the sig value changes as it should. I've noticed that if I also just open the program and use the down error, the disp values will remain the same until I hit "Rx: Tylenol No. 3" at which time they'll change to the correct value. Granted, none of this is repeatable 100% of the time, so if you just play with it, you'll see what I mean. Also - why won't this work if I use the arrow keys to scroll through the items? It almost seems to me like this is a program-time related issue. If I use the same method as above using mouse selection of "Rx: Hydrocodone..." , then WAIT for 10 seconds after selection "Rx: Penicillin...", the Disp values update correctly. So if it is a time/processing issue, is there a way to make it more... instant? I can't afford to have any computer related errors when talking about prescriptions, so any help would be greatly appreciated! The script, at present, seems very unreliable.
  15. So I had a question about the best way to solve this problem. I'm writing data to an excel sheet. This data writing only needs to be one way... I don't need to edit it through the program at all. My problem comes from formatting. Right now the variable $QSID is a string of numbers, often with one or two leading zeros. By default, excel drops these. However, if you change the cell attribute to "text" instead of numbers, it will allow them. So, thinking I could just go ahead and do that, I opened my chart and changed all the cells to text. Well... after I did that, when I use ReadSheetToArray, it returns those formatted cells as containing data... so when I use _ExcelWriteArray($oExcel, $row, 1, $aRxData), it will just write the data to the last cell that I have not formated (maybe like... row 4000). I'm guessing I need to determine which $row to write in using a different method. I saw a function for removing white space, but I'm not sure if that would be helpful here. I've also read about using macros, but I'm not sure how I'd impliment them. Any suggestions would be greatly apperciated. ;start excel stuff $sFilePath1 = "file.xls" ;This file should already exist $oExcel = _ExcelBookOpen($sFilePath1, 0); If @error = 1 Then MsgBox(0, "Error!", "Unable to Create the Excel Object") Exit ElseIf @error = 2 Then MsgBox(0, "Error!", "File does not exist!") Exit EndIf $aArray = _ExcelReadSheetToArray($oExcel) $row = $aArray[0][0] + 1 ; used to detect the next open collumn. $col = $aArray[0][1] Local $aRxData[5] = [$QSID, $Date, $Prescription, " ", $User] _ExcelWriteArray($oExcel, $row, 1, $aRxData) ; write array after existing data sleep(500) _ExcelBookSaveAs($oExcel, "file.xls", "xls", 0, 1) ; overwrite existing file if necessary _ExcelBookClose($oExcel) ; EndSwitch WEnd
×
×
  • Create New...