Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 16 to 30 of 39
  1. #16
    Join Date
    May 2006
    Posts
    5,291
    eventually it'll all turn into frustration on a level you would love to pull off your nails, and pull out your hair
    No, that REALLY dident help, Thanks for that

    ok, today i got some time, took the day off work because the misses is ill (shes not, but my boss thinks she is ) so hopefully i can get my bits done and look at all the new plugins

    BTW, this looks really useful

  2. #17
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,277
    Quote Originally Posted by RizlaUK View Post
    No, that REALLY dident help, Thanks for that
    Hehe sorry about that XD

    Quote Originally Posted by RizlaUK View Post
    ok, today i got some time, took the day off work because the misses is ill (shes not, but my boss thinks she is ) so hopefully i can get my bits done and look at all the new plugins
    Cool, I have 4 days off too, I should be on a 'field trip' school tried to obligate me to, but they failed. I now get to stay at home and eventually do a replacing task
    Quote Originally Posted by RizlaUK View Post

    BTW, this looks really useful
    Thanks, I'm really happy about the on the fly system lol
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  3. #18
    Join Date
    Oct 2009
    Location
    Merton, United Kingdom
    Posts
    684
    Quote Originally Posted by Imagine Programming View Post
    Thanks, I'm really happy about the on the fly system lol
    All my objects are going in my Global Functions from now on so I can call them anywhere in my script.

  4. #19
    Join Date
    May 2006
    Posts
    5,291
    dose that mean you can set the text of "Input1" on "Page1" from "Button2" on "Page2" or from a dialog ???

    if so that could really cut down my variable use

  5. #20
    Join Date
    Oct 2009
    Location
    Merton, United Kingdom
    Posts
    684
    Quote Originally Posted by RizlaUK View Post
    dose that mean you can set the text of "Input1" on "Page1" from "Button2" on "Page2" or from a dialog ???

    if so that could really cut down my variable use
    Hmm, don't think so as it still uses Input.SetText which only works on one page, however if Imagine really has the patience he could append stuff to the On Preload of that page to set it when you go back to that page which is possible if you use Application.SetPageScript.

  6. #21
    Join Date
    Oct 2009
    Location
    Merton, United Kingdom
    Posts
    684
    Here's a function that'll help set Script of an object on another page, it won't set the text but I still find it quite useful.

    Function:
    Code:
    Page.ObjectScriptBuffer = {};
    
    function Page.SetObjectScriptEx(szPage, szObject, szEvent, szScript)
    	assert(type(szPage) == "string", "Argument 1 must be of type string.");
    	assert(type(szObject) == "string", "Argument 2 must be of type string.");
    	assert(type(szEvent) == "string", "Argument 3 must be of type string.");
    	assert(type(szScript) == "string", "Argument 4 must be of type string.");
    	
    	if (Application.GetCurrentPage() == szPage) then
    		Page.SetObjectScript(szObject, szEvent, szScript);
    		
    		return (Application.GetLastError() == 0);
    	else
    		local Index = Table.Count(Page.ObjectScriptBuffer) + 1;
    		Page.ObjectScriptBuffer[Index] = szScript;
    		
    		Application.SetPageScript(szPage, "On Preload", Application.GetPageScript(szPage, "On Preload").."\r\n\r\n-- Shadiku was here. ^_^\r\nPage.SetObjectScript(\""..szObject.."\", \""..szEvent.."\", Page.ObjectScriptBuffer["..Index.."]);\r\n");
    		
    		return (Application.GetLastError() == 0);
    	end
    end
    Example usage:
    Code:
    Page.SetObjectScriptEx("Page2", "Input1", "On Key", [[if (e_Key == 13) then
    	Dialog.Message("", "Why hello there.");
    end]]);
    Example attached.
    Attached Files

  7. #22
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,277
    @Dean. I don't know actually, I havn't tested that yet, but, the properties on
    the fly system does not use SetText, it uses SetProperties. So it'll try to
    attempt to set the properties of the object on that page.

    Maybe I'll work Sakuya's script in ^^ I havn't had time yesterday, so I'll work
    on it tonight. Sakuya (Can I please use your real name, easier to type XD) also
    requested I rename the .Props field to .Properties...
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  8. #23
    Join Date
    May 2006
    Posts
    5,291
    what is his real name ? (Bob) << easy to type!

    Hey bas, looks like you got your return key working

    Maybe I'll work Sakuya's script in ^^ I havn't had time yesterday, so I'll work
    on it tonight.
    HaHa, do you know how many times iv said that......still havent had time, lol

    it would be nice if the aforementioned props thing would work, i could stop using dialog variables

  9. #24
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,277
    Quote Originally Posted by RizlaUK View Post
    what is his real name ? (Bob) << easy to type!

    Hey bas, looks like you got your return key working



    HaHa, do you know how many times iv said that......still havent had time, lol

    it would be nice if the aforementioned props thing would work, i could stop using dialog variables
    Haha well, I'm still using the return-knob but I'm getting used to it, not strange
    after 3000 lines of code just in this plugin haha

    The props thing works, but only for objects on current page/dialogex.
    The way you wish to see it is possible, but first I gotta do some other
    stuff on this plugin, I still need to check if it's possible. Because, working
    this onto all objectfunctions is going to be a PAIN
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  10. #25
    Join Date
    May 2006
    Posts
    5,291
    i kind of see the point of what IR did there, im working on a little app in PB that has 5 windows and 50+ objects on each window, the enumeration's list is huge

    i love the new AC system tho, makes life soooo much less "what did i call that object!!!" if you get what i mean

  11. #26
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,277
    Quote Originally Posted by RizlaUK View Post
    i kind of see the point of what IR did there, im working on a little app in PB that has 5 windows and 50+ objects on each window, the enumeration's list is huge

    i love the new AC system tho, makes life soooo much less "what did i call that object!!!" if you get what i mean
    Oh in PB I don't mind the number of objects, the objectID's increase, so I tend to use linked lists for objects ^^

    For example the mainwindow I use

    Code:
    NewList MainWindow.GadgetList() ; defined structure
    AddElement(MainWindow())
    MainWindow()\Identifier = "CloseButton"
    MainWindow()\GadgetID = ButtonGadget(#PB_Any,.....
    MainWindow()\EventProc = @MainButton1()
    andsoforth, I don't know, but this makes event and control handling easier for me
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  12. #27
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,277
    Could somebody try me the next code and tell me how
    the Input object behaves?

    If possible, please create a multiline input object and name it Input1
    Put the next code On Show:

    Code:
    Input1 = Object:Create("Input1");
    Input1.Props.FontColor = Math.HexColorToNumber("FFFFFF");
    Input1.Props.BackgroundColor = 0;
    Input1:SetAppendDelimiter("\r\n");
    Input1:SetText("The Object Action Plugin, oh lord, SOME L-OOP FINALLY!");
    Input1:Append("No seriously, this is pretty neet, because every");
    Input1:Append("AMS objects can now be approached through a L-OOPy script!");
    Input1:Append("");
    Input1:Append("Oh and don't forget about the POTF system!");
    please tell me how the content looks afterwards, and how
    the input object behaves. Over here the exclamationmarks
    show up at the beginning of the sentences and the object
    turns into a right-to-left oriented object, but on some moments
    it's back in left-to-right again

    This happened only on Input objects so far, but this is so strange...
    because when I use Input1:SetProperties it doesn't do funny stuff...
    while the property on the fly system also uses Input1:SetProperties!
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  13. #28
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,277
    Okay, a recreation of the problem, make an object named "Input1",
    make it multiline and paste the next code in the On Show event of
    the page.

    Code:
    local function cp(s,v)
    	local p = Input.GetProperties("Input1");
    	for i, nv in p do
    		if(tostring(i)==tostring(s))then
    			p[i]=v;
    		end
    	end
    	Input.SetProperties("Input1", p);
    end
    Input1 = Object:Create("Input1");
    cp("FontColor", Val("FFFFFF"));
    cp("BackgroundColor", 0);
    cp("X", 10);
    cp("Y", 10);
    cp("Width", Input1:GetSize().Width-20);
    cp("Height", Input1:GetSize().Height-20);
    Input1:SetAppendDelimiter("\r\n");
    Input1:SetText("What the ****!");
    Input1:Append("is wrong,");
    Input1:Append("with me!");
    Input1:Append("");
    Input1:Append("http://test.com/backslash_not_behind_this_but_first_character/");

    This is what I see: (See attached)

    Oh, and change **** to h.e.l.l without dots in above code

    I even tested other ways, like modifying each key seperately by statements like
    Code:
    if(tostring(i)=="FontColor")then
        p.FontColor = v;
    end
    but it still failed... what the, did I find an unfindable bug or is it me?
    Attached Images
    Last edited by Imagine Programming; 03-10-2010 at 10:16 PM.
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  14. #29
    Join Date
    Aug 2007
    Location
    Tampon, Reunion island
    Posts
    191

    hello !

    Hello everyone ! This action plugin looks pretty awesome ! But is everyone have tutorials about Object LOOP ?

    Thank you in advance !

  15. #30
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,277
    Quote Originally Posted by nico210 View Post
    Hello everyone ! This action plugin looks pretty awesome ! But is everyone have tutorials about Object LOOP ?

    Thank you in advance !
    Read the helpfile and the information from this thread.
    This plugin basicly puts all AMS object related acitons
    in a object oriented model. So you can now set an input's
    text like this:

    Code:
    Input1 = Object:Create("Input1") --this object already exists on the current page/dialog.
    --See the helpfile for more information about previous action.
    
    Input1:SetText("New text!");
    Input1:SetAppendDelimiter("\r\n");
    Input1:Append("Each time you do this, a new rule will be added!");
    
    Image1 = Object:Create("Image1"); --this object also exists!
    Image1:FadeOut(20,10);
    Image1.Props.Opacity = 50 --changes the opacity from 20 to 50
    This kinda stuff, don't use the properties on the fly system for input objects just yet, it bugs out alot!

    Oh by the way, there actually is an example included, check it out!
    __________________
    Bas,
    Imagine Programming
    iEnc Action Plugin
    Object Action Plugin
    Last edited by Imagine Programming; 03-10-2010 at 11:24 PM. Reason: Added a line.
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts