Forum Replies Created
-
AuthorPosts
-
lmyers@aurora-healthcare.com
ParticipantThanks for replying! Honestly I am not sure what is causing it, the page still seems to act the same except for the download location, still needs to have the same javascript code sent to download the files, which is like 30 per page so setting the initdownload with the location and filename necessary where it is and how often it does get set. I have been able to figure out where the downloads go and I am finding the location everytime when the download does not go where I want, because the directory has changed on me off and on between downloads. I do seem to need to keep that directory clean on successful downloads as well since it seems they stay there, but the code seems to work so I guess it is ok for now. I am not sure what has caused the issue to start yet, maybe one day it will show itself. For anyone that faces this in the future my "temp" directory for the downloads within the Webview was within the C:UsersmyuserdirAppDataLocalTemp2 I just scan it each download to find the last created directory and the files just show up in there with a temporary name with no extension, I just move them and name them where I want them to go, so at some point may just forgo the initdownload setting and do it on my own, may be more stable, unless I am just doing something stupid I have not found yet, which is highly possible.Thanks again!
lmyers@aurora-healthcare.com
ParticipantJust wanted to post that I have finally figured it out, but needed to make a helper app for it that reads the gmail api. I tried through the javascript version but it was really giving me a fit with logging in I had to click the allow etc etc etc everytime I did it. I started to use the .net version and wrote an app using copied code from the web and it started to work. So what I have it doing is any emails from the 2FA email address get moved to a certain folder in gmail, so they are easy to find. Then the helper app reads the latest email from the folder and parses out the code and then hands it back to VBA (still ironing out that part but is trivial compared to getting this working up to this point. So soon I should have 2FA working for some of my automations and eventually should be able to create passwords too that require the 2FA to work. Can share the code with anyone after I get it completed for the helper app. Have a good day.
lmyers@aurora-healthcare.com
ParticipantNo appologies needed, I appreciate any help you can give! I have found some stuff but it is failing, may be just because the code is too old now. This would be great for getting around the MFAs I have been facing.
lmyers@aurora-healthcare.com
ParticipantOk awesome thank you!
lmyers@aurora-healthcare.com
ParticipantOk, thanks a bunch. I am doing this in VBA so it is a bit different but makes sense what you are doing, I just need to add this to any code that is a bit sketchy and it will basically give me my line number.
Thanks for your help!.
lmyers@aurora-healthcare.com
ParticipantOk, so you mean you would have that F("TimeoutStep")= set at miscelaneous spots and then have it sent to you? I do that in our production environment App and place it in a DB and was leaning this way to help me find the issue. Thank you for that! I do have shutdown happening it just never seems to get to it. I will look at that User issue too thanks!
June 21, 2023 at 2:12 pm in reply to: RE:sending emails from an automation and also detect within runtime environment #4948lmyers@aurora-healthcare.com
ParticipantAh ok, I knew there must be something in BWS that would tell me where I was.
Thanks
June 20, 2023 at 8:28 pm in reply to: RE:sending emails from an automation and also detect within runtime environment #4848lmyers@aurora-healthcare.com
ParticipantOk found out how to determine if in Runtime or IDE in case anyone else wants to know that for some reason. You need to create a new module with the following code:
Option Explicit
Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineW" () As Long
Declare Function lstrlenW Lib "kernel32" (ByVal lpString As Long) As Long
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
(MyDest As Any, MySource As Any, ByVal MySize As Long)Public Function CmdLineToStr() As String
'Returns the command line used to open Excel
Dim Buffer() As Byte, StrLen As Long, CmdPtr As Long
CmdPtr = GetCommandLine()
If CmdPtr > 0 Then
StrLen = lstrlenW(CmdPtr) * 2
If StrLen > 0 Then
ReDim Buffer(0 To (StrLen – 1)) As Byte
CopyMemory Buffer(0), ByVal CmdPtr, StrLen
CmdLineToStr = Buffer
End If
End If
End FunctionThen in your automation use this to determine if it is run in IDE
Dim cmdlinepassed As String
cmdlinepassed = CmdLineToStr()
If InStr(1, cmdlinepassed, "BWSAgent.exe") > 0 Then
'this should mean it is IDE???
'seems like IDE has a BWSAgent commandline executableElse
'this means we should be in an automation!
'seems like automation has a BWSRuntime.exe commandline executable
Shutdown_
End IfHope that helps some people. This way if in IDE you do not want something to happen or vice versa you can now do that.
June 20, 2023 at 3:11 pm in reply to: RE:sending emails from an automation and also detect within runtime environment #4833lmyers@aurora-healthcare.com
ParticipantThat would a great feature, well at least for me. I will work on using it the way your email shows, seems like it could work. I do have time to build this since the clients are not receiving emails yet so my email address is only shown to my company within the email I create, but soon we may need to send emails to the clients and then I do not want them getting my email address.
As far as the isapplicationrunning part, does that just basically check the task manager to see if those are running? so if I am running BWS IDE and trying to fire off automation at the same time both would be considered true? What my vision is, if I am running in IDE I do not want to shutdown BWS when the automation completes, but if I am running from task scheduler then shutdown should occur. I am not sure how possible it is but it would help me not lose code when I have that shutdown fire during the IDE run. Another question I found autosave before in BWS, but now I am using a new machine for this, I cannot find where I found that setting, can you help?Thank you so much for all of the help! It is definitely different than most other companies today, that never respond to people!
Larrylmyers@aurora-healthcare.com
ParticipantThank you again! I figured that when I tried using it and saw what the options were.
lmyers@aurora-healthcare.com
ParticipantAHHHH! Thank you for this! this is perfect! It was very hard to get BWS to recognize my rdp session layout to click windows button and wanted to find how to get around that. I do have one question what is the C.K.? Is it just calling the "keyboard"? I really appreciate your help
lmyers@aurora-healthcare.com
ParticipantOk, that makes sense, but there could be times where there are windows left open that could get in the way of a shortcut, was trying to sendkeys, but see that the windows key shortcuts do not work that way, so that I could then use the run command on the rdp to execute the application. So I guess I would need to minimize all windows and thne double click the icon at that point.
-
AuthorPosts