this is driving me nuts, i've used the same code many many times before, just added it to my latest project and i get stuck in a looping error code
i'm baffled, i've got to be over looking something stupid here i'm sure
here is the code that is causing the headache, it is located in Global, and called from the PageTimer script for each page in my project, the Page.StartTimer call is made from the On.Show script for each page.... that is working ok. The GUID and current_GUID is defined in StartUp using a dll to get ardware fingerprint and my known fingerprint, this is also working fine (i currently have it set to a fake GUID so it thinks it's not my machine)
and here is the error i am getting.....
.... can someone tell me if they have seen this before? i've looked through the rest of the project, and i haven't used those variables before, or clashed any of the other things in that code that i can see
i even deleted this and copied the example directly from the help files and i am still getting the same error related to the same line of code
i'm baffled, i've got to be over looking something stupid here i'm sure
here is the code that is causing the headache, it is located in Global, and called from the PageTimer script for each page in my project, the Page.StartTimer call is made from the On.Show script for each page.... that is working ok. The GUID and current_GUID is defined in StartUp using a dll to get ardware fingerprint and my known fingerprint, this is also working fine (i currently have it set to a fake GUID so it thinks it's not my machine)
Code:
139 -- Timer Function -- 140 function TimerControl () 141 142 if GUID ~= current_GUID then -- check if it's me 143 144 windows = Window.EnumerateTitles(); 145 146 -- Window Title Targets -- 147 window_name1 = "temp"; 148 window_name2 = "ir_ext_temp"; 149 window_name3 = "AutoPlay"; 150 151 for handle, title in windows do -- Loop through the table 152 -- Search for Target Text -- 153 result1 = String.Find(title, window_name1, 1, false); 154 result2 = String.Find(title, window_name2, 1, false); 155 result3 = String.Find(title, window_name3, 1, true); 156 157 -- Check for match, close if true -- 158 if (result1 ~= -1) then 159 Window.Close(handle, CLOSEWND_SENDMESSAGE); 160 elseif (result2 ~= -1) then 161 Window.Close(handle, CLOSEWND_SENDMESSAGE); 162 elseif (result3 ~= -1) and (String.Length(title) == 8) then 163 Window.Close(handle, CLOSEWND_SENDMESSAGE); 164 end 165 end 166 167 end 168 end
and here is the error i am getting.....
On Timer, Line153: attempt to index a string value
.... can someone tell me if they have seen this before? i've looked through the rest of the project, and i haven't used those variables before, or clashed any of the other things in that code that i can see
i even deleted this and copied the example directly from the help files and i am still getting the same error related to the same line of code
Comment