I've given up... No scripts of mine work properly anymore when compiled... I've made a function in order to replace all "StringSplit" with "Loop parse" automatically.
YOU WILL HAVE TO SELECT THE ENTIRE LINE WITH StringSplit (INCLUDING LINE CARRIAGE) AND PRESS "F5".
Code:
#SingleInstance force
#Delimiter Ø
#EscapeChar £
#CommentFlag €
Return
f5::
ReplaceStringSplit()
Return
ReplaceStringSplit(old_line="") {
{ € ;OLD LINE AS PARAMETER OR SEND CONTROL C
If old_line =
{
Loop
{
If A_TimeIdlePhysical > 1000
Break
Else
Sleep 444
}
AutoTrim Ø Off
Clipboard =
Send ^c
ClipWait
copied=%Clipboard%
}
Else
copied=%old_line%
StringReplace Ø copied Ø copied Ø `r Ø All
StringReplace Ø copied Ø copied Ø `l Ø All
}
{ € ;NUMBER OF 'TABS' BEFORE SENTENCE
StringGetPos Ø tab_number Ø copied Ø StringSplit
Loop Ø parse Ø copied Ø ,
{
copied%A_Index%=%A_LoopField%
copied0=%A_Index%
}
}
{ € ;DECLARE VARIABLES
AutoTrim Ø On
var_out = %copied2%
var_in = %copied3%
AutoTrim Ø Off
delimiter =%copied4%
StringGetPos Ø delimiter_break_line Ø delimiter Ø £n
StringTrimRight Ø delimiter Ø delimiter Ø 1
}
{ € ;NEWS 'TABS' BEFORE SENTENCE
Loop %tab_number%
tabs_string=%tabs_string%%A_Tab%
}
{ € ;INPUT VAR WITH '%'
If var_in contains £%
{
additional_script_in=%tabs_string%var_input:=%var_in%£n
€ ;MsgBox Ø 0 Ø Alert 59 - IN Ø %var_in% Ø 5
var_in=var_input
}
If var_out contains £%
{
additional_script_out=%tabs_string%var_output:=%var_out%£n
€ ;MsgBox Ø 0 Ø Alert 63 - OUT Ø %var_out% Ø 5
var_out=£%var_output£%
}
}
{ € ;NEW STRING
final_string=;%copied%%additional_script_in%%additional_script_out%%tabs_string%Loop, parse, %var_in%,%delimiter%£n%tabs_string%{£n%tabs_string% %var_out%£%A_Index£%=£%A_LoopField£% £n%tabs_string% %var_out%0=£%A_Index£% £n%tabs_string%}£n
}
{ € ;RETURN
If old_line =
{
€ ;Send ^d
clipboard = %final_string%
AutoTrim Ø On
€ ;sleep 25
Send ^v
Return
}
Else
{
AutoTrim Ø On
Return final_string
}
}
}