Solved

modifying .lss file and execute the code via LS agent

Posted on 2004-09-14
12
284 Views
Last Modified: 2013-12-18
Is it possible to modify the .lss file in the background(on server) and then call functions/subs from any agent (one or multiple dbs) ?

meaning:

1. keep modifying the content of codeexecution.lss file using AgentA that will write code from a notesdocument to the lss file.
2. AgentB will call the functions from codeexecution.lss

Note: i ve kept the function names (calling & called) the same in AgentB so that i don;t have to modify or resave AgentB.

Does it work this way ?

0
Comment
Question by:navgup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
12 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12057213
No..You have to recompile with the new .lss file again

~Hemanth
0
 

Author Comment

by:navgup
ID: 12057703
Can LSO file work instead ? How do you actually compile source to get a .LSO file?
0
 

Author Comment

by:navgup
ID: 12057711
Or is there a way via API to recompile .LSS file ?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12058284

You can always save and sign the design objects using c/c++ api.

Do a search and you can find some interesting topics/solns here
0
 
LVL 13

Expert Comment

by:CRAK
ID: 12062123
This bit might help you....

Lets say we have an lss file "c:\temp\extls.lss".
I created one that contained following code:

Sub LssCode(Text as String)
   Messagebox Text
End Sub


I call the file from this agent (manually, run once):

Sub Initialize
      Dim code As String
      Dim my_code As String
      Dim code_ret As Integer
      Dim cd As String
      
      cr = Chr$(10) + Chr$(13)
      
      my_code = Inputbox$("Please enter code to execute:", "Run-time compilation?")
      
      code = _
      "Option Declare" + cr + _
      "%include " + Chr$(34) + "c:\temp\extls.lss" + Chr$(34) + cr + _
      "Sub Initialize" + cr + _
      my_code + cr + _
      "End Sub"
      
      code_ret = Execute ( code )
End Sub


First thing is does is ask me to enter a line of code. This required compilation, doesn't it?
I entered:

      Call LssCode("Hello world")

The code is then fed into a sub, executed: a messagebox appears: "Hello world".

In short: it should be possible.....!
Enjoy!
0
 

Author Comment

by:navgup
ID: 12063547

Thanks, What if i pass the file name as a static parameter and keep changing the code in the file and then want to run the agent on scheduled basis ?
0
 
LVL 13

Accepted Solution

by:
CRAK earned 35 total points
ID: 12063891
The entire "code" is built dynamically in my example above.
I haven't tried, but I bet it'll work!

Good point this approach, instead of modifying an active lss! I had not seen the upcoming problems yet....  ;-))
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12065634
CRAK.. the scope doesn't extend beyond the execute module.. execute module loads , compiles, runs and destroy and nothing is available out of this scope...

So navgup has to include all of his code inside a string and pass it to execute method. And I am sure there is a limit of how much data you can send to this method.
0
 
LVL 13

Expert Comment

by:CRAK
ID: 12072656
;-(
It looked promising though! But with that info, perhaps navgup can still find a way to archieve whatever he/she's trying to do....

From R5 designer help:

Number of lines per script or source file, not including the contents of %Include files: 64K
Depth of nested %Include directives: 16
Size of executable module code: limited by available memory
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Migration: Lotus Notes to Exchange 2013 10 345
Lotus notes VB code 4 213
Lotus Domino server 9 7 91
IBM Lotus notes 9 105
For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question