monpasdg
-
Posts
30 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by monpasdg
-
-
I've had a few problems trying to detect if a variable has a null value.
I've tried
If string = "" but this doesn't seem to be reliable.
Is there an easy way in me3 to tell if a variable has not been assigned a value?
How do I strip the value from a particular variable to make it null?
What about trimming the variable before the comparison? The code above wouldn't catch an "empty" variable with spaces.
Side note:
Copying from excel I have found to be a pain. My solution was to either use <F2> to open the cell then have the macro select the contents or I have a macro that will select the entire spread sheet and convert it to a tabbed delimited csv file on my desktop. When reads much better into macro express.
It only takes about 40 lines of code to do this and produces much better results when working with excel. I left my headings in, you will notice I spent too much time creating the flowerbox
<REM2:++==========================================================++><REM2:*-^*-^*-^*-^*-^*-^*-^*-^*-^*-Macro Title-^*-^*-^*-^*-^*-^*-^*-^*-^*-^*-^*-^><REM2: Macro Title Create CSV From Excel><REM2: ><REM2: ><REM2:*-^*-^*-^*-^*-^*-^*-^*-^*-^*-Description-^*-^*-^*-^*-^*-^*-^*-^*-^*-^*-^*-^><REM2: Macro Description ><REM2: 1. Get claim information from spreadsheet><REM2: 2. Format to Comma Delimited><REM2: 3. Ouput to CSV File><REM2: ><REM2:~`~`~`~`~`~`~`~`~`~`~`~`Author`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`><REM2:.-*´¨) ¸.-*¨) ¸.-´¸.-*´¨) ¸.-*¨) ¸.-¸.-*´¨)¸.-*¨).-*´¨) ¸.-*¨) ¸.-´¸.-*´¨) ¸.-*¨) ¸.-¸.-*´¨)¸.-*¨)><REM2:(¸.-´ (¸.-´ (¸.-` (¸.-´(¸.-´ (¸.- First Name (¸.-´ (¸.-´-´(¸.- (¸.-´(¸.-´ -´(¸.- (¸.-´(¸.-´-´(¸.-><REM2:.-*´¨) ¸.-*¨) ¸.-´¸.-*´¨) ¸.-*¨) ¸.-¸.-*´¨)¸.-*¨).-*´¨) ¸.-*¨) ¸.-´¸.-*´¨) ¸.-*¨) ¸.-¸.-*´¨)¸.-*¨)><REM2: (¸.-´ (¸.-´-´(¸.- (¸.-´Last Name (¸.-´-´(¸.-´ (¸.-´-´(¸.-(¸.-´ -´(¸.- (¸.-´(¸.-´-´(¸.-(¸.-´(¸.-´><REM2:.-*´¨) ¸.-*¨) ¸.-´¸.-*´¨) ¸.-*¨) ¸.-¸.-*´¨)¸.-*¨).-*´¨) ¸.-*¨) ¸.-´¸.-*´¨) ¸.-*¨) ¸.-¸.-*´¨)¸.-*¨)><REM2: (¸.-´(¸.-(¸.-´-´(¸.- (¸.-´ (¸.-´-´04/29/09 -´ (¸.-´(¸.- (¸.-´ -´(¸.-(¸.-´(¸.-´ -´(¸.-(¸.-´(¸.-><REM2:.-*´¨) ¸.-*¨) ¸.-´¸.-*´¨) ¸.-*¨) ¸.-¸.-*´¨)¸.-*¨).-*´¨) ¸.-*¨) ¸.-´¸.-*´¨) ¸.-*¨) ¸.-¸.-*´¨)¸.-*¨)><REM2:~`~`~`~`~`~`~`~`~`~`~`~`Mods`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`><REM2: MOD: User Name, Date, Description of Mod><REM2: ><REM2: ><REM2:++==========================================================++><REM2:><REM2:><REM2:><REM2:><REM2:-=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=-><REM2: Variables><REM2:-=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=-><REM2:T70: File Location><REM2:T70: Ouput Folder><REM2:T72: Data location><REM2:-=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=-><REM2: Variables><REM2:-=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=--=+=-><REM2:><REM2:><REM2:><REM2:><REM2:><REM2:************************************************************************ ***************><REM2: Initalization><REM2:************************************************************************ ***************><REM2:><REM2:+=--=+=--=+=--=+=File Path Setups+=--=+=--=+=--=+=><REM2:T70: File Location><VSETMISC:T70:Path to Desktop><REM2:T70: Ouput Folder><TMVAR2:07:70:00:000:000:\Excel To CSV Output><REM2:T72: Data location><TVAR2:72:01:%T70%\Excel SpreadSheet CSV.csv><REM2:><REM2:><REM2:+=--=+=--=+=--=+=Create CSV File+=--=+=--=+=--=+=><GETCONTROL:01:EXCEL.EXE:001:bosa_sdm_XL9Go To><TEXTTYPE:<F5>><WAITCONTROL:000010:000000:01:02><TEXTTYPE:A1<ENTER>><WAITPB><TEXTTYPE:<CTRL>a><WAITPB><REM2:><CLIPC><REM2:cannot empty clipboard!!!! excel crashes long wait needed><MSD:500><REM2:><REM2:><TVAR2:01:03:><REM2:><REM2:><REP3:08:000001:000001:0003:0:01:A><REM2:><TBOX4:T:3:Center000Top001158000332:000:Copied Contents%T1%><MENU2:2:T:03:000553Center:Verify SelectionIs the Above Screen The Proper Selected Excel Document? (Formatting too) Note: The columns may not line up. Just verify that the information is there from the spread sheet.1: Yes 2: No><TBCLOSE:Copied Contents><REM2:><IFVAR2:1:03:1:B><REM2:><TBOX4:T:4:Center000Top000278000200:000:Correct SelectionSelected the cells that are to be looked up. Press OK when done><REM2:><CLIPC><MSD:500><REM2:><TVAR2:01:03:><ENDIF><ENDREP><REM2:><REM2:><REM2:+=--=+=--=+=--=+=Output Excel to Readable Spread Sheet+=--=+=--=+=--=+=><TBOX4:T:3:CenterCenter000278000200:000:Please WaitFormatting Copied Information... Processing><REM2:This allows for Comma Delimited, Standard is tab delimited><DIS:<TMVAR2:21:01:01:000:000: ,><REM2:><TMVAR2:17:01:00:000:000:%T72%F><TBCLOSE:Please Wait><REM2:><REM2:><REM2:><REM2:><REM2:><REM2:><REM2:><REM2:><REM2:><REM2:*************************************-END-*******************************************><REM2: Initalization><REM2:*************************************-END-*******************************************>
Cheers,
Don
-
Oh I forgot to put the single cell formula (I hate doing cross column formulas)
This would get rid of the extra cells and you can just have one column for cleaner results
A1 is just where the time stamp is.
=NOW()*24-A1*24
If you do this formula and it has a result that looks like the time stamp, just format the cell to a number
Cheers,
-Don
-
As an afterthought since I am already using excel to track some of this data I may just use an excel formula to do this rather than ME.
If your going to use excel you would need to do the following:
Create a cell with this Function
=now()
Using both the time stamp and that function cell, create two cell that multiply them by 24 (puts those times into hours)
=A1*24
=A2*24
Then the difference between the Now() cell and the time stamp will be in hours.
You can make this easily into days, minutes and seconds as well.
Days: Remove *24 mulitplication
Minutes: Use A1*24*60
Seconds: Use A1*24*60*60
I attached a screen shot to show this better.
-
OK, I officially give up. ... I wish someone could answer... You would be the answer to my prayers!
Frustrated...
Have a nice day!
Pat
Don't give up!
I modified your code, see if this works. Under the "Text Type" option, the radio button "Send Text To Control" should be selected. This will type in the contol as if it was focused.
<GETCONTROL2:01:AMS.EXE:ThunderRT6MDIFormAppraisal Management System005:1MDIClient1ThunderRT6FormDC8SSTabCtlWndClass81ThunderRT6Frame 1ThunderRT6TextBox><TEXTTYPECT:1:Test: Text to Control>
ME stops keyboard working
in Macro Express 3.x
Posted
I have a few ideas that might fix this.
1. Did you edit the macro to hold down certain keys? (Altdown, ctrl down)
2. You can try to restore the keyboard hooks with macro express
3. My last idea has to do with the macro hitting a function key such as Scroll Lock/SysRq/Pause.