My Assistant
![]()
Custom Search
|
![]() ![]() |
![]() |
![]() Post#21 | |
Posts: 7 Joined: 4-January 19 ![]() | whiteshark29: CODE Dim clipData as String clipData = ClipboardPaste() this would add the current contents of the clipboard to the variable clipData. If this does not work, please provide more information about the error you get and what exactly you are trying to do with the data. |
![]() Post#22 | |
Posts: 2 Joined: 27-July 19 ![]() | Im still not getting it. I tried all the lines below (this is just the tail end of my macro) rem HostScreenPutString("@/@v") rem HostScreenSendKey( "Paste") rem HostScreenSendKey( "Ctrl+V") Dim clipData as String ClipData = ClipboardPaste() ClipboardPaste() I just want to copy an account# from another program (omse) to icoms. I get this error when it runs "An error has occurred while processing the script. Line 60 - Functions returns a value,must be used in expression" |
![]() Post#23 | |
Posts: 7 Joined: 4-January 19 ![]() | You will need to know the location of the field you want to enter it into. The easiest way is probably to open the emulator and look there. All of the scripting is based off of the emulator, not the GUI. You can access the emulator by right clicking on the title bar at the very top of the icoms window and choosing "Show Emulator" form the drop down list. A new window will pop up with the emulator screen. It will mirror the data of the icoms window that you just opened it from. if you click on the account number field in the emulator, you will see at the bottom left of the screen an x,y coordinate. it will look something like 2-18. The first number, 2, is the row. The second is the column. Icoms has 25 rows, top to bottom and 80 columns, left to right. once you have the correct x,y coordinate you can use: CODE HostCursorPut(2,18) HostScreenPutString(ClipboardPaste()) HostCursorPut(2,18) will move your cursor to row 2, column 18. HostScreenPutString(ClipboardPaste()) will put the contents of the clipboard into the field at that location. 2 and 18 will need to be changed to the correct coordinates of your account field. Keep in mind that location can vary depending on the screen you are currently on. Also, in icoms the account number field is split on some screens so you may need to do something like this. CODE Dim acct1,acct2 as String rem grab all the characters the length of the characters rem except the last 2 and stores them in the variable acct2 acct1 = Left(ClipboardPaste(),Len(ClipboardPaste())-2) rem this will get the 2 characters on the right of the rem string and put them in the variable acct2 acct2 = Right(ClipboardPaste(),2) HostCursorPut(2,18) HostScreenPutString(acct1) HostCursorPut(2,25) HostScreenPutString(acct2) Again, i don't remember the locations, so the locations used in the HostCursorPut functions are just examples. |
![]()
Custom Search
|
![]() | Search Top Lo-Fi | 12th December 2019 - 10:30 PM |